Skip to content

Commit 02a7226

Browse files
committed
Updated GitHub actions with parameterized tag; Updated readme to document actions build pipeline
1 parent f074f40 commit 02a7226

File tree

2 files changed

+38
-10
lines changed

2 files changed

+38
-10
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ name: Build Jupyter Coder Images
33

44
on:
55
workflow_dispatch:
6+
inputs:
7+
jupyter_tag:
8+
description: 'Jupyter tag (e.g. 2025-11-10)'
9+
required: false
10+
default: 'latest'
611
push:
712
branches: [ main ]
813
paths:
9-
- "images/**"
14+
- "images/jupyter/**"
1015
- ".github/workflows/build.yml"
1116

1217
jobs:
@@ -19,13 +24,13 @@ jobs:
1924
fail-fast: false
2025
matrix:
2126
base:
22-
- jupyter/minimal-notebook:latest
23-
- jupyter/scipy-notebook:latest
24-
# - jupyter/datascience-notebook:latest
25-
# - jupyter/tensorflow-notebook:latest
26-
# - jupyter/pytorch-notebook:latest
27-
# - jupyter/r-notebook:latest
28-
# - jupyter/all-spark-notebook:latest
27+
- quay.io/jupyter/minimal-notebook:${{ inputs.jupyter_tag || vars.JUPYTER_TAG || 'latest' }}
28+
- quay.io/jupyter/scipy-notebook:${{ inputs.jupyter_tag || vars.JUPYTER_TAG || 'latest' }}
29+
- quay.io/jupyter/datascience-notebook:${{ inputs.jupyter_tag || vars.JUPYTER_TAG || 'latest' }}
30+
- quay.io/jupyter/tensorflow-notebook:cuda-${{ inputs.jupyter_tag || vars.JUPYTER_TAG || 'latest' }}
31+
- quay.io/jupyter/pytorch-notebook:cuda12-${{ inputs.jupyter_tag || vars.JUPYTER_TAG || 'latest' }}
32+
- quay.io/jupyter/r-notebook:${{ inputs.jupyter_tag || vars.JUPYTER_TAG || 'latest' }}
33+
- quay.io/jupyter/julia-notebook:${{ inputs.jupyter_tag || vars.JUPYTER_TAG || 'latest' }}
2934
steps:
3035
- uses: actions/checkout@v4
3136

@@ -49,7 +54,7 @@ jobs:
4954
# e.g., jupyter/scipy-notebook:latest -> scipy-notebook
5055
NAME="$(echo "$BASE" | awk -F'[/:]' '{print $(NF-1)}')"
5156
echo "name=$NAME" >> $GITHUB_OUTPUT
52-
# Tag scheme: ghcr.io/org/repo/<stack>:<upstream-tag>-coder
57+
# Tag scheme: ghcr.io/org/repo/<stack>:<jupyter-tag>-coder
5358
OWNER="$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')"
5459
REPO="$(echo '${{ github.repository }}' | cut -d/ -f2 | tr '[:upper:]' '[:lower:]')"
5560
echo "image=ghcr.io/$OWNER/$REPO/$NAME" >> $GITHUB_OUTPUT
@@ -65,5 +70,6 @@ jobs:
6570
push: true
6671
tags: |
6772
${{ steps.names.outputs.image }}:latest
73+
${{ steps.names.outputs.image }}:${{ inputs.jupyter_tag || vars.JUPYTER_TAG || 'latest' }}
6874
cache-from: type=gha
6975
cache-to: type=gha,mode=max

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,35 @@ Container images for use with [Coder](https://github.com/coder/coder)
66

77
We repackage several of the [Jupyter Docker Stacks](https://github.com/jupyter/docker-stacks) images with necessary changes to work with Coder.
88

9+
### GitHub Actions Build Instructions
10+
11+
This repo is configured to build all of the container images specified in the GitHub Actions [.github/workflows/build.yml](./.github/workflows/build.yml) file.
12+
These builds can be viewed at [Build Jupyter Coder Images](https://github.com/SDSU-Research-CI/coder-images/actions/workflows/build.yml).
13+
The resulting container images should be linked on the repo home page in the packages section to the right.
14+
15+
Builds can be triggered manually on the repo's actions tab, via pushing an update to the repo under the `images/jupyter` directory or an update to the workflow yaml file itself.
16+
The jupyter tag should be given a value of `latest` or a build date like `2025-11-10` on the respective images from [quay.io/organization/jupyter](https://quay.io/organization/jupyter).
17+
Either build trigger will default to `latest` if unset.
18+
- Manually triggered builds will prompt for a jupyter_tag value
19+
- Automatic builds will use the value of the JUPYTER_TAG variable specified in the repo Settings → Secrets and variables → Actions → Variables
20+
21+
>Note: There are some images which have a specific cuda version which may need to have the `cuda12` portion of their tag updated directly in the action yaml file. I.E. the PyTorch notebook.
22+
923
### Manual Build Instructions
1024

1125
Some images may need to be built locally due to container image size limitations in GitHub Actions.
1226
As of writing, this limitation is currently 10GB.
1327

1428
In order to build the Jupyter Docker Stack-based images locally, we need to specify the build target of `notebook-image`, i.e.:
1529

16-
```
30+
```bash
1731
docker build . -f Dockerfile -t [your-dockerhub-username]/[image-name]:v[x.x] --target notebook-image
1832
```
33+
34+
Once the container has been built, it should be tested on a dev instance of coder prior to being retagged as an official image.
35+
36+
Execute the following to retag a locally built image, replacing the notebook name:
37+
```bash
38+
docker image tag [container-id] ghcr.io/sdsu-research-ci/coder-images/[notebook-name]:[jupyter_tag]
39+
```
40+
- I.E. `docker image tag ea984ac26018 ghcr.io/sdsu-research-ci/coder-images/minimal-notebook:2025-11-10`

0 commit comments

Comments
 (0)