Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Stan to 2.36.0 #253

Merged
merged 4 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/docker_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Docker image deploy

on:
push:
branches:
- main
paths:
- "backend/**"
workflow_dispatch:
inputs:
tag:
description: 'Docker image tag'
required: true
default: 'latest'

jobs:
docker-deploy:
name: Docker deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Docker Builder
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
run: |
cd backend/
INPUT_TAG=${{ github.event.inputs.tag }}
TAG=${INPUT_TAG:-"latest"}
docker build -t ghcr.io/flatironinstitute/stan-wasm-server:$TAG .
docker push ghcr.io/flatironinstitute/stan-wasm-server:$TAG
38 changes: 16 additions & 22 deletions .github/workflows/vercel_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- vercel-deploy-2 # for initial test
# manual trigger
workflow_dispatch:

Expand All @@ -13,24 +12,19 @@ jobs:
name: Vercel deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
name: Install Vercel CLI
run: npm install --global vercel@latest
-
name: Create .vercel/project.json
run: |
cd gui
mkdir -p .vercel
echo '{"projectId":"${{ secrets.VERCEL_PROJECT_ID }}", "orgId":"${{ secrets.VERCEL_ORG_ID }}"}' > .vercel/project.json
-
name: Pull Vercel Environment Information
run: |
cd gui
vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
-
name: Build Project Artifacts
run: |
cd gui
vercel --prod --token=${{ secrets.VERCEL_TOKEN }}

- uses: actions/checkout@v4
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Create .vercel/project.json
run: |
cd gui
mkdir -p .vercel
echo '{"projectId":"${{ secrets.VERCEL_PROJECT_ID }}", "orgId":"${{ secrets.VERCEL_ORG_ID }}"}' > .vercel/project.json
- name: Pull Vercel Environment Information
run: |
cd gui
vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: |
cd gui
vercel --prod --token=${{ secrets.VERCEL_TOKEN }}
6 changes: 3 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dockerfile
FROM emscripten/emsdk:3.1.59 AS builder
FROM emscripten/emsdk:3.1.73 AS builder

# Set the working directory
WORKDIR /app
Expand All @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y \
tar

# Clone the oneTBB library and checkout the specific commit
RUN wget https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.13.0.tar.gz && \
RUN wget https://github.com/uxlfoundation/oneTBB/archive/refs/tags/v2021.13.0.tar.gz && \
tar -xvf v2021.13.0.tar.gz && \
mv oneTBB-2021.13.0 oneTBB

Expand All @@ -40,7 +40,7 @@ RUN pip install uvicorn
# Clone the TinyStan repository and checkout a specific commit
RUN git clone https://github.com/WardBrian/tinystan.git && \
cd tinystan && \
git checkout "e1e675ea21873e3365bb0d54a843f4c0f54bf6a8" && \
git checkout "28e4156837260d8e752dfc50c00fbe2409236c11" && \
git submodule update --init --recursive

# Copy the local configuration file for TinyStan
Expand Down
9 changes: 0 additions & 9 deletions backend/build_and_push.sh

This file was deleted.

2 changes: 1 addition & 1 deletion docs/compilation_server_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ These instructions are only required if you want to set up your own compilation
To run your own server locally using Docker, execute the following command:

```
docker run -p 8083:8080 -it magland/stan-wasm-server:latest
docker run -p 8083:8080 -it ghcr.io/flatironinstitute/stan-wasm-server:latest
```

After setting up the server, navigate to https://stan-playground.flatironinstitute.org.
Expand Down
3 changes: 2 additions & 1 deletion gui/src/app/Compilation/Control/CompilationServerDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ const ConfigureCompilationServerDialog: FunctionComponent<
</p>
<div>
<pre>
docker run -p 8083:8080 -it magland/stan-wasm-server:latest
docker run -p 8083:8080 -it
ghcr.io/flatironinstitute/stan-wasm-server:latest
</pre>
</div>
</div>
Expand Down
27,056 changes: 13,870 additions & 13,186 deletions gui/src/app/Stanc/stanc.js

Large diffs are not rendered by default.

Loading