Skip to content

Commit

Permalink
Merge pull request #253 from flatironinstitute/update/stan-2.36.0
Browse files Browse the repository at this point in the history
Update Stan to 2.36.0
  • Loading branch information
WardBrian authored Dec 18, 2024
2 parents 88e056c + 939712b commit f4c4684
Show file tree
Hide file tree
Showing 7 changed files with 13,931 additions and 13,222 deletions.
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.

0 comments on commit f4c4684

Please sign in to comment.