Skip to content

Commit 823e1db

Browse files
author
Liav Weiss (EXT-Nokia)
committed
Migrate kubeflow/kubeflow example_notebook_servers_publish.yaml GitHub Action to kubeflow/notebooks - notebooks-v1 branch
Signed-off-by: Liav Weiss (EXT-Nokia) <[email protected]>
1 parent 5f191bc commit 823e1db

File tree

2 files changed

+180
-0
lines changed

2 files changed

+180
-0
lines changed
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: Build & Publish Notebook Servers
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- notebooks-v1
7+
- v*-branch
8+
paths:
9+
- components/example-notebook-servers/**
10+
- releasing/version/VERSION
11+
12+
jobs:
13+
base_images:
14+
name: Build & Push - Base
15+
uses: ./.github/workflows/example_notebook_servers_publish_TEMPLATE.yaml
16+
secrets: inherit
17+
with:
18+
build_arch: linux/amd64,linux/arm64
19+
image_folders: |
20+
base
21+
22+
codeserver_images:
23+
name: Build & Push - Code Server
24+
uses: ./.github/workflows/example_notebook_servers_publish_TEMPLATE.yaml
25+
needs: [ base_images ]
26+
secrets: inherit
27+
with:
28+
build_arch: linux/amd64,linux/arm64
29+
image_folders: |
30+
codeserver
31+
codeserver-python
32+
33+
rstudio_images:
34+
name: Build & Push - RStudio
35+
uses: ./.github/workflows/example_notebook_servers_publish_TEMPLATE.yaml
36+
needs: [ base_images ]
37+
secrets: inherit
38+
with:
39+
build_arch: linux/amd64,linux/arm64
40+
image_folders: |
41+
rstudio
42+
rstudio-tidyverse
43+
44+
jupyter_images:
45+
name: Build & Push - Jupyter
46+
uses: ./.github/workflows/example_notebook_servers_publish_TEMPLATE.yaml
47+
needs: [ base_images ]
48+
secrets: inherit
49+
with:
50+
build_arch: linux/amd64,linux/arm64
51+
image_folders: |
52+
jupyter
53+
54+
jupyter_scipy_images:
55+
name: Build & Push - Jupyter (SciPy)
56+
uses: ./.github/workflows/example_notebook_servers_publish_TEMPLATE.yaml
57+
needs: [ jupyter_images ]
58+
secrets: inherit
59+
with:
60+
build_arch: linux/amd64,linux/arm64
61+
image_folders: |
62+
jupyter-scipy
63+
64+
jupyter_pytorch_images:
65+
name: Build & Push - Jupyter (PyTorch)
66+
uses: ./.github/workflows/example_notebook_servers_publish_TEMPLATE.yaml
67+
needs: [ jupyter_images ]
68+
secrets: inherit
69+
with:
70+
build_arch: linux/amd64,linux/arm64
71+
image_folders: |
72+
jupyter-pytorch
73+
jupyter-pytorch-full
74+
75+
jupyter_pytorch_cuda_images:
76+
name: Build & Push - Jupyter (PyTorch + CUDA)
77+
uses: ./.github/workflows/example_notebook_servers_publish_TEMPLATE.yaml
78+
needs: [ jupyter_images ]
79+
secrets: inherit
80+
with:
81+
# TODO: support 'linux/arm64' for PyTorch CUDA images
82+
build_arch: linux/amd64
83+
image_folders: |
84+
jupyter-pytorch-cuda
85+
jupyter-pytorch-cuda-full
86+
87+
jupyter_pytorch_gaudi_images:
88+
name: Build & Push - Jupyter (PyTorch + Gaudi)
89+
uses: ./.github/workflows/example_notebook_servers_publish_TEMPLATE.yaml
90+
needs: [ jupyter_images ]
91+
secrets: inherit
92+
with:
93+
build_arch: linux/amd64
94+
image_folders: |
95+
jupyter-pytorch-gaudi
96+
jupyter-pytorch-gaudi-full
97+
98+
jupyter_tensorflow_images:
99+
name: Build & Push - Jupyter (TensorFlow)
100+
uses: ./.github/workflows/example_notebook_servers_publish_TEMPLATE.yaml
101+
needs: [ jupyter_images ]
102+
secrets: inherit
103+
with:
104+
build_arch: linux/amd64,linux/arm64
105+
image_folders: |
106+
jupyter-tensorflow
107+
jupyter-tensorflow-full
108+
109+
jupyter_tensorflow_cuda_images:
110+
name: Build & Push - Jupyter (TensorFlow + CUDA)
111+
uses: ./.github/workflows/example_notebook_servers_publish_TEMPLATE.yaml
112+
needs: [ jupyter_images ]
113+
secrets: inherit
114+
with:
115+
# TODO: support 'linux/arm64' for TensorFlow CUDA images
116+
build_arch: linux/amd64
117+
image_folders: |
118+
jupyter-tensorflow-cuda
119+
jupyter-tensorflow-cuda-full
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build & Publish Notebook Servers (TEMPLATE)
2+
on:
3+
workflow_call:
4+
inputs:
5+
build_arch:
6+
required: true
7+
description: "architectures to build for, comma separated"
8+
type: string
9+
image_folders:
10+
required: true
11+
description: "image folders to build, ordered by dependency, whitespace separated"
12+
type: string
13+
14+
env:
15+
REGISTRY: ghcr.io/kubeflow/kubeflow/notebook-servers
16+
CACHE_IMAGE: ghcr.io/${{ github.repository }}/notebook-servers/build-cache
17+
18+
jobs:
19+
build_and_push_images:
20+
name: Build & Push Images
21+
runs-on: ubuntu-22.04
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- uses: dorny/paths-filter@v3
27+
id: filter
28+
with:
29+
base: ${{ github.ref }}
30+
filters: |
31+
version:
32+
- 'releasing/version/VERSION'
33+
34+
- name: Setup QEMU
35+
uses: docker/setup-qemu-action@v3
36+
37+
- name: Setup Docker Buildx
38+
uses: docker/setup-buildx-action@v3
39+
40+
- name: Login to GitHub Container Registry
41+
uses: docker/login-action@v3
42+
with:
43+
registry: ghcr.io
44+
username: ${{ github.actor }}
45+
password: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: Build and Push Notebook Server images
48+
env:
49+
ARCH: ${{ inputs.build_arch }}
50+
IMAGE_FOLDERS: ${{ inputs.image_folders }}
51+
SHOULD_TAG_LATEST: ${{ github.ref == 'refs/heads/notebooks-v1' }}
52+
SHOULD_TAG_VERSION: ${{ steps.filter.outputs.version == 'true' }}
53+
run: |
54+
if [[ "$SHOULD_TAG_LATEST" = "true" ]]; then
55+
export ALSO_TAG_LATEST=1
56+
fi
57+
if [[ "$SHOULD_TAG_VERSION" = "true" ]]; then
58+
export ALSO_TAG_VERSION=$(cat releasing/version/VERSION)
59+
fi
60+
cd components/example-notebook-servers/
61+
make docker-build-push-multi-arch

0 commit comments

Comments
 (0)