From 2a2eddbb892662f49b270db93639367fe73715e2 Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Fri, 31 Oct 2025 16:17:56 +0000 Subject: [PATCH 1/9] Update build.yaml --- .github/workflows/build.yaml | 41 ++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7bf586d..81c70bb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,7 +13,7 @@ jobs: matrix: platform: - linux/amd64 - #- linux/arm64 + - linux/arm64 runs-on: ${{ matrix.platform == 'linux/amd64' && 'ubuntu-24.04' || matrix.platform == 'linux/arm64' && 'ubuntu-24.04-arm' }} name: build ${{ matrix.platform }} outputs: @@ -39,7 +39,30 @@ jobs: with: images: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }} + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3.11.1 + + - name: Build and push by digest + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v6.18.0 + with: + file: ./docker/Dockerfile + platforms: ${{ matrix.platform }} + labels: ${{ steps.meta.outputs.labels }} + tags: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }} + outputs: type=docker,push-by-digest=true,name-canonical=true,push=true + + #- name: Run tests + # if: github.event_name == 'pull_request' + # shell: bash + # run: | + # docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:latest bash -c " \ + # pip install pytest nbmake; \ + # find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; " + - name: Authenticate with GHCR + if: github.event_name != 'pull_request' id: auth uses: docker/login-action@v3.6.0 with: @@ -47,11 +70,8 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.BUILD_TOKEN }} - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3.11.1 - - name: Build and push by digest + if: github.event_name != 'pull_request' id: build uses: docker/build-push-action@v6.18.0 with: @@ -61,21 +81,24 @@ jobs: tags: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }} outputs: type=image,push-by-digest=true,name-canonical=true,push=true - #- name: Test notebooks + #- name: Run tests + # if: github.event_name != 'pull_request' # shell: bash # run: | # docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}@${{ steps.build.outputs.digest }} bash -c " \ # pip install pytest nbmake; \ - # find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600;" + # find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; " - name: Export digest + if: github.event_name != 'pull_request' run: | mkdir -p ${{ runner.temp }}/digests digest="${{ steps.build.outputs.digest }}" touch "${{ runner.temp }}/digests/${digest#sha256:}" - name: Upload digest - uses: actions/upload-artifact@v4.6.2 + if: github.event_name != 'pull_request' + uses: actions/upload-artifact@v5.0.0 with: name: digests-${{ env.PLATFORM_PAIR }} path: ${{ runner.temp }}/digests/* @@ -90,7 +113,7 @@ jobs: - build steps: - name: Download digests - uses: actions/download-artifact@v5.0.0 + uses: actions/download-artifact@v6.0.0 with: path: ${{ runner.temp }}/digests pattern: digests-* From d9d0c54cafb0841e16719cdb24c997c60acb3213 Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Thu, 20 Nov 2025 09:39:58 +0000 Subject: [PATCH 2/9] add arm arch gromacs --- .github/workflows/build.yaml | 2 ++ docker/Dockerfile | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 81c70bb..5b7d57f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -47,6 +47,7 @@ jobs: if: github.event_name == 'pull_request' uses: docker/build-push-action@v6.18.0 with: + build-args: TARGETPLATFORM=${{ matrix.platform }} file: ./docker/Dockerfile platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} @@ -75,6 +76,7 @@ jobs: id: build uses: docker/build-push-action@v6.18.0 with: + build-args: TARGETPLATFORM=${{ matrix.platform }} file: ./docker/Dockerfile platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} diff --git a/docker/Dockerfile b/docker/Dockerfile index cc8b399..33a0a22 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,12 +4,19 @@ FROM ghcr.io/ccpbiosim/jupyterhub-base:$BASE_IMAGE LABEL maintainer="James Gebbie-Rayet " +ARG TARGETPLATFORM + # Switch to jovyan user. USER $NB_USER WORKDIR $HOME # Install workshop deps -RUN mamba install gromacs=2024.4=nompi_h5f56185_100 matplotlib=3.10.6 mdanalysis=2.9.0 numpy=2.3.3 scikit-learn=1.7.2 tqdm=4.67.1 mdtraj=1.11.0 iprogress ipywidgets salilab::dssp=3.0.0 -y +RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ + mamba install conda-forge/linux-64::gromacs=2024.5=nompi_h5f56185_100 -y; \ + elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ + mamba install conda-forge/linux-aarch64::gromacs=2024.5=nompi_h9afd374_100 -y; \ + fi +RUN mamba install matplotlib=3.10.6 mdanalysis=2.9.0 numpy=2.3.3 scikit-learn=1.7.2 tqdm=4.67.1 mdtraj=1.11.0 iprogress ipywidgets salilab::dssp=3.0.0 -y RUN pip install alphashape==1.3.1 click==8.3.0 click-log==0.4.0 coby==1.0.9 pbr==7.0.1 rtree==1.4.1 shapely==2.1.2 trimesh==4.8.3 vermouth==0.15.0 # Get workshop files and move them to jovyan directory. From 14b3445bdbb3d77c32333c97b384da1be2d704c3 Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Thu, 20 Nov 2025 09:51:11 +0000 Subject: [PATCH 3/9] Update build.yaml --- .github/workflows/build.yaml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 51d7277..94fb6df 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -54,13 +54,13 @@ jobs: tags: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }} outputs: type=docker,push-by-digest=true,name-canonical=true,push=true - #- name: Run tests - # if: github.event_name == 'pull_request' - # shell: bash - # run: | - # docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:latest bash -c " \ - # pip install pytest nbmake; \ - # find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; " + - name: Run tests + if: github.event_name == 'pull_request' + shell: bash + run: | + docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:latest bash -c " \ + pip install pytest nbmake; \ + find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; " - name: Authenticate with GHCR if: github.event_name != 'pull_request' @@ -83,13 +83,13 @@ jobs: tags: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }} outputs: type=image,push-by-digest=true,name-canonical=true,push=true - #- name: Run tests - # if: github.event_name != 'pull_request' - # shell: bash - # run: | - # docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}@${{ steps.build.outputs.digest }} bash -c " \ - # pip install pytest nbmake; \ - # find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; " + - name: Run tests + if: github.event_name != 'pull_request' + shell: bash + run: | + docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}@${{ steps.build.outputs.digest }} bash -c " \ + pip install pytest nbmake; \ + find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; " - name: Export digest if: github.event_name != 'pull_request' From 68717d01d5d7fa372437a2c9ea97bfa7dcafbd72 Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Fri, 21 Nov 2025 13:59:07 +0000 Subject: [PATCH 4/9] remove dssp dssp has no ARM64 build available, we can use mdtraj --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 33a0a22..21c74e2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,7 +16,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ mamba install conda-forge/linux-aarch64::gromacs=2024.5=nompi_h9afd374_100 -y; \ fi -RUN mamba install matplotlib=3.10.6 mdanalysis=2.9.0 numpy=2.3.3 scikit-learn=1.7.2 tqdm=4.67.1 mdtraj=1.11.0 iprogress ipywidgets salilab::dssp=3.0.0 -y +RUN mamba install matplotlib=3.10.6 mdanalysis=2.9.0 numpy=2.3.3 scikit-learn=1.7.2 tqdm=4.67.1 mdtraj=1.11.0 iprogress ipywidgets -y RUN pip install alphashape==1.3.1 click==8.3.0 click-log==0.4.0 coby==1.0.9 pbr==7.0.1 rtree==1.4.1 shapely==2.1.2 trimesh==4.8.3 vermouth==0.15.0 # Get workshop files and move them to jovyan directory. From 73a66dec58a31da5b62ac850f124b2115bf09416 Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Fri, 21 Nov 2025 14:25:48 +0000 Subject: [PATCH 5/9] skip the bash cells at the end of nb1 --- 1-allatom_setup/1-AA_assembly.ipynb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/1-allatom_setup/1-AA_assembly.ipynb b/1-allatom_setup/1-AA_assembly.ipynb index d3e9479..da596b6 100644 --- a/1-allatom_setup/1-AA_assembly.ipynb +++ b/1-allatom_setup/1-AA_assembly.ipynb @@ -121,6 +121,9 @@ "execution_count": null, "id": "132110f0", "metadata": { + "tags": [ + "skip-execution" + ] "vscode": { "languageId": "shellscript" } @@ -141,6 +144,9 @@ "execution_count": null, "id": "17be9184", "metadata": { + "tags": [ + "skip-execution" + ] "vscode": { "languageId": "shellscript" } From ca21c416f6169506381fa57e4e978076b43f2f3b Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Fri, 21 Nov 2025 14:26:32 +0000 Subject: [PATCH 6/9] Update 1-AA_assembly.ipynb --- 1-allatom_setup/1-AA_assembly.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-allatom_setup/1-AA_assembly.ipynb b/1-allatom_setup/1-AA_assembly.ipynb index da596b6..134318e 100644 --- a/1-allatom_setup/1-AA_assembly.ipynb +++ b/1-allatom_setup/1-AA_assembly.ipynb @@ -123,7 +123,7 @@ "metadata": { "tags": [ "skip-execution" - ] + ], "vscode": { "languageId": "shellscript" } @@ -146,7 +146,7 @@ "metadata": { "tags": [ "skip-execution" - ] + ], "vscode": { "languageId": "shellscript" } From f70deeece1050b8aacd423c6d7de96c41df63ee0 Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Fri, 21 Nov 2025 14:39:19 +0000 Subject: [PATCH 7/9] Update 2-AA_simulation.ipynb --- 2-allatom_sim/2-AA_simulation.ipynb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/2-allatom_sim/2-AA_simulation.ipynb b/2-allatom_sim/2-AA_simulation.ipynb index 42e3f10..ac246f6 100644 --- a/2-allatom_sim/2-AA_simulation.ipynb +++ b/2-allatom_sim/2-AA_simulation.ipynb @@ -23,6 +23,9 @@ "execution_count": null, "id": "e4676c05", "metadata": { + "tags": [ + "skip-execution" + ], "vscode": { "languageId": "shellscript" } @@ -68,6 +71,9 @@ "execution_count": null, "id": "8232c4a7", "metadata": { + "tags": [ + "skip-execution" + ], "vscode": { "languageId": "shellscript" } @@ -120,6 +126,9 @@ "execution_count": null, "id": "839435bb", "metadata": { + "tags": [ + "skip-execution" + ], "vscode": { "languageId": "shellscript" } From 87650e7fa54f6c96ba9d02320c6b2a474b7782b8 Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Fri, 21 Nov 2025 14:53:26 +0000 Subject: [PATCH 8/9] Update 4-CG_equilibration.ipynb --- 4-coarsegrain_equilibration/4-CG_equilibration.ipynb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/4-coarsegrain_equilibration/4-CG_equilibration.ipynb b/4-coarsegrain_equilibration/4-CG_equilibration.ipynb index 56a3504..10c3327 100644 --- a/4-coarsegrain_equilibration/4-CG_equilibration.ipynb +++ b/4-coarsegrain_equilibration/4-CG_equilibration.ipynb @@ -88,6 +88,9 @@ "execution_count": 2, "id": "b072482e", "metadata": { + "tags": [ + "skip-execution" + ], "vscode": { "languageId": "shellscript" } @@ -3821,6 +3824,9 @@ "execution_count": null, "id": "5cd6e11a", "metadata": { + "tags": [ + "skip-execution" + ], "vscode": { "languageId": "shellscript" } From bc38eec9a7ded339c63027a22b912ad5dce5d7b4 Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Fri, 21 Nov 2025 15:00:10 +0000 Subject: [PATCH 9/9] Update 4-CG_equilibration.ipynb --- 4-coarsegrain_equilibration/4-CG_equilibration.ipynb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/4-coarsegrain_equilibration/4-CG_equilibration.ipynb b/4-coarsegrain_equilibration/4-CG_equilibration.ipynb index 10c3327..0fe70d0 100644 --- a/4-coarsegrain_equilibration/4-CG_equilibration.ipynb +++ b/4-coarsegrain_equilibration/4-CG_equilibration.ipynb @@ -107,11 +107,11 @@ "name": "stdout", "output_type": "stream", "text": [ - "Info) VMD for LINUXAMD64, version 1.9.2 (December 29, 2014)\n", + "Info) for LINUXAMD64, version 1.9.2 (December 29, 2014)\n", "Info) http://www.ks.uiuc.edu/Research/vmd/ \n", "Info) Email questions and bug reports to vmd@ks.uiuc.edu \n", "Info) Please include this reference in published work using VMD: \n", - "Info) Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual \n", + "Info) Humphrey, W., Dalke, A. and Schulten, K., `- Visual \n", "Info) Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.\n", "Info) -------------------------------------------------------------\n", "Info) Multithreading available, 24 CPUs detected.\n", @@ -146,7 +146,7 @@ "Info) Fragments: 18062 Protein: 0 Nucleic: 0\n", "after#0\n", "Material23\n", - "Info) VMD for LINUXAMD64, version 1.9.2 (December 29, 2014)\n", + "Info) for LINUXAMD64, version 1.9.2 (December 29, 2014)\n", "Info) Exiting normally.\n" ] } @@ -154,7 +154,7 @@ "source": [ "%%bash\n", "\n", - "vmd output_initial_state.pdb" + "output_initial_state.pdb" ] }, { @@ -3473,6 +3473,9 @@ "execution_count": null, "id": "a417bb34", "metadata": { + "tags": [ + "skip-execution" + ], "vscode": { "languageId": "shellscript" }