Skip to content
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
31 changes: 14 additions & 17 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5.8.0
with:
images: ghcr.io/${{ github.repository }}
images: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}

- name: Authenticate with GHCR
id: auth
Expand All @@ -54,9 +54,10 @@ jobs:
id: build
uses: docker/build-push-action@v6.18.0
with:
file: ./docker/Dockerfile
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
tags: ghcr.io/${{ github.repository }}
tags: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}
outputs: type=image,push-by-digest=true,name-canonical=true,push=true

- name: Export digest
Expand Down Expand Up @@ -102,7 +103,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5.8.0
with:
images: ghcr.io/${{ github.repository }}
images: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}
tags: dev

- name: Create manifest list and push
Expand All @@ -116,18 +117,18 @@ jobs:
--annotation='index:org.opencontainers.image.created=${{ steps.timestamp.outputs.timestamp }}' \
--annotation='index:org.opencontainers.image.url=${{ github.event.repository.url }}' \
--annotation='index:org.opencontainers.image.source=${{ github.event.repository.url }}' \
$(printf 'ghcr.io/${{ github.repository }}@sha256:%s ' *)
$(printf 'ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}@sha256:%s ' *)

- name: Create manifest list and push without annotations
if: steps.annotate.outcome == 'failure'
working-directory: ${{ runner.temp }}/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf 'ghcr.io/${{ github.repository }}@sha256:%s ' *)
$(printf 'ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}@sha256:%s ' *)

- name: Inspect image
run: |
docker buildx imagetools inspect ghcr.io/${{ github.repository }}:dev
docker buildx imagetools inspect ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:dev

tests:
strategy:
Expand All @@ -147,13 +148,9 @@ jobs:
- name: Test notebooks
shell: bash
run: |
docker run -t ghcr.io/${{ github.repository }}:dev bash -c "\
bash /home/jovyan/aiida-start; \
jupyter nbconvert --to notebook --execute PTH2R_coarse-grained_tutorial.ipynb; \
sleep 300; \
verdi process list -a; \
! verdi process list -a | grep -E '\[(3.*?)\]'; \
! verdi process list -a | grep -E 'Waiting'; "
docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:dev bash -c " \
pip install pytest nbmake; \
find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; "

tags:
runs-on: ubuntu-24.04
Expand All @@ -175,14 +172,14 @@ jobs:
shell: bash
run: |
docker buildx imagetools create \
--tag ghcr.io/${{ github.repository }}:latest \
--tag ghcr.io/${{ github.repository }}:${{ needs.build.outputs.tag }} \
ghcr.io/${{ github.repository }}:dev
--tag ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:latest \
--tag ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:${{ needs.build.outputs.tag }} \
ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:dev

- name: Post version update to dash
uses: peter-evans/repository-dispatch@v3.0.0
with:
token: ${{ secrets.BUILD_TOKEN }}
repository: jimboid/biosim-workshops-dash
event-type: build
event-type: build
client-payload: '{"repo": "${{ github.event.repository.name }}", "tag": "${{ needs.build.outputs.tag }}"}'
13 changes: 6 additions & 7 deletions Dockerfile → docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Start with BioSim base image.
ARG BASE_IMAGE=latest
FROM ghcr.io/jimboid/biosim-jupyterhub-base:$BASE_IMAGE
FROM ghcr.io/ccpbiosim/jupyterhub-base:$BASE_IMAGE

LABEL maintainer="James Gebbie-Rayet <james.gebbie@stfc.ac.uk>"
LABEL org.opencontainers.image.source=https://github.com/jimboid/biosim-aiida-gpcr-workshop
LABEL org.opencontainers.image.source=https://github.com/ccpbiosim/aiida-gpcr-workshop
LABEL org.opencontainers.image.description="A container environment for the PSDI workshop on AiiDA tools for data collection."
LABEL org.opencontainers.image.licenses=MIT

Expand Down Expand Up @@ -39,19 +39,18 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
fi
RUN pip3 install aiida-gromacs mdtraj vermouth

RUN git clone https://github.com/jimboid/aiida-gromacs.git && \
RUN git clone https://github.com/PSDI-UK/aiida-gromacs.git && \
mv aiida-gromacs/examples/PTH2R_coarse-grained_files . && \
mv aiida-gromacs/notebooks/PTH2R_coarse-grained_tutorial.ipynb . && \
rm -rf aiida-gromacs

COPY --chown=1000:100 aiida-stop /home/jovyan/

RUN echo "./aiida-start" >> ~/.bashrc
COPY --chown=1000:100 default-37a8.jupyterlab-workspace /home/jovyan/.jupyter/lab/workspaces/default-37a8.jupyterlab-workspace
COPY --chown=1000:100 docker/default-37a8.jupyterlab-workspace /home/jovyan/.jupyter/lab/workspaces/default-37a8.jupyterlab-workspace
COPY --chown=1000:100 aiida-start /home/jovyan/
COPY --chown=1000:100 aiida-stop /home/jovyan/

# UNCOMMENT THIS LINE FOR REMOTE DEPLOYMENT
COPY jupyter_notebook_config.py /etc/jupyter/
COPY docker/jupyter_notebook_config.py /etc/jupyter/

# Always finish with non-root user as a precaution.
USER $NB_USER
File renamed without changes.