Skip to content

Commit 85ccf1a

Browse files
committed
Merge branch '2024a' of https://github.com/opendatahub-io/notebooks into rsync-2024a
2 parents 391e435 + 42dac2d commit 85ccf1a

File tree

69 files changed

+12402
-2717
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+12402
-2717
lines changed

.github/workflows/build-notebooks-TEMPLATE.yaml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,38 @@ jobs:
3434
username: ${{ github.actor }}
3535
password: ${{ secrets.GITHUB_TOKEN }}
3636

37+
- name: Free up additional disk space
38+
# https://docs.github.com/en/actions/learn-github-actions/expressions
39+
if: "${{ contains(inputs.target, 'amd') || contains(inputs.target, 'cuda') || contains(inputs.target, 'intel') ||
40+
contains(inputs.target, 'pytorch') || contains(inputs.target, 'tensorflow') }}"
41+
run: |
42+
set -x
43+
44+
df -h
45+
46+
sudo rm -rf /usr/local/lib/android &
47+
sudo rm -rf /usr/local/share/boost &
48+
sudo rm -rf /usr/local/lib/node_modules &
49+
sudo rm -rf /usr/share/dotnet &
50+
sudo rm -rf /opt/ghc &
51+
sudo rm -rf /opt/hostedtoolcache/CodeQL &
52+
53+
sudo docker image prune --all --force &
54+
55+
wait
56+
57+
df -h
58+
59+
- name: Mount lvm overlay for podman builds
60+
run: |
61+
df -h
62+
free -h
63+
64+
bash ./ci/cached-builds/gha_lvm_overlay.bash
65+
66+
df -h
67+
free -h
68+
3769
# https://github.com/containers/buildah/issues/2521#issuecomment-884779112
3870
- name: Workaround https://github.com/containers/podman/issues/22152#issuecomment-2027705598
3971
run: sudo apt-get -qq remove podman crun
@@ -58,12 +90,10 @@ jobs:
5890
mkdir -p $HOME/.config/containers/
5991
cp ci/cached-builds/containers.conf $HOME/.config/containers/containers.conf
6092
cp ci/cached-builds/storage.conf $HOME/.config/containers/storage.conf
93+
6194
# should at least reset storage when touching storage.conf
62-
sudo mkdir -p /mnt/containers/
63-
sudo chown -R $USER:$USER /mnt/containers
6495
podman system reset --force
65-
# podman bug? need to create this _after_ doing the reset
66-
mkdir -p /mnt/containers/tmp
96+
mkdir -p $HOME/.local/share/containers/storage/tmp
6797
6898
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
6999
- name: "push: make ${{ inputs.target }}"

.github/workflows/build-notebooks-pr.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,40 @@
11
---
22
"name": "Build Notebooks"
3-
"permissions":
4-
"packages": "read"
53
"on":
64
"pull_request":
75

6+
permissions:
7+
contents: read
8+
packages: read
9+
pull-requests: read
10+
811
jobs:
912
gen:
1013
name: Generate job matrix
1114
runs-on: ubuntu-latest
1215
outputs:
1316
matrix: ${{ steps.gen.outputs.matrix }}
17+
has_jobs: ${{ steps.gen.outputs.has_jobs }}
1418
steps:
1519
- uses: actions/checkout@v4
16-
- run: python3 ci/cached-builds/gen_gha_matrix_jobs.py
20+
21+
- run: |
22+
python3 ci/cached-builds/gen_gha_matrix_jobs.py \
23+
--owner=${{ github.repository_owner }} \
24+
--repo=${{ github.event.pull_request.base.repo.name }} \
25+
--pr-number=${{ github.event.pull_request.number }} \
26+
--skip-unchanged
1727
id: gen
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1830
19-
# base images
2031
build:
2132
needs: ["gen"]
2233
strategy:
2334
fail-fast: false
2435
matrix: "${{ fromJson(needs.gen.outputs.matrix) }}"
2536
uses: ./.github/workflows/build-notebooks-TEMPLATE.yaml
37+
if: ${{ fromJson(needs.gen.outputs.has_jobs) }}
2638
with:
2739
target: "${{ matrix.target }}"
2840
github: "${{ toJSON(github) }}"

.github/workflows/build-notebooks.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,61 @@
444444
},
445445
"secrets": "inherit"
446446
},
447+
"amd-c9s-python-3_9": {
448+
"needs": [
449+
"base-c9s-python-3_9"
450+
],
451+
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",
452+
"with": {
453+
"target": "amd-c9s-python-3.9",
454+
"github": "${{ toJSON(github) }}"
455+
},
456+
"secrets": "inherit"
457+
},
458+
"amd-jupyter-minimal-c9s-python-3_9": {
459+
"needs": [
460+
"amd-c9s-python-3_9"
461+
],
462+
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",
463+
"with": {
464+
"target": "amd-jupyter-minimal-c9s-python-3.9",
465+
"github": "${{ toJSON(github) }}"
466+
},
467+
"secrets": "inherit"
468+
},
469+
"amd-jupyter-datascience-c9s-python-3_9": {
470+
"needs": [
471+
"amd-jupyter-minimal-c9s-python-3_9"
472+
],
473+
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",
474+
"with": {
475+
"target": "amd-jupyter-datascience-c9s-python-3.9",
476+
"github": "${{ toJSON(github) }}"
477+
},
478+
"secrets": "inherit"
479+
},
480+
"amd-jupyter-tensorflow-c9s-python-3_9": {
481+
"needs": [
482+
"amd-jupyter-datascience-c9s-python-3_9"
483+
],
484+
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",
485+
"with": {
486+
"target": "amd-jupyter-tensorflow-c9s-python-3.9",
487+
"github": "${{ toJSON(github) }}"
488+
},
489+
"secrets": "inherit"
490+
},
491+
"amd-jupyter-pytorch-c9s-python-3_9": {
492+
"needs": [
493+
"amd-jupyter-datascience-c9s-python-3_9"
494+
],
495+
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",
496+
"with": {
497+
"target": "amd-jupyter-pytorch-c9s-python-3.9",
498+
"github": "${{ toJSON(github) }}"
499+
},
500+
"secrets": "inherit"
501+
},
447502
"base-anaconda-python-3_8": {
448503
"needs": [],
449504
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",

.github/workflows/params-env.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
22
name: Validation of image references (image SHAs) in params.env and runtime images
33
on: # yamllint disable-line rule:truthy
4+
push:
45
pull_request:
56
paths:
67
- 'manifests/base/commit.env'
78
- 'manifests/base/params.env'
89
- 'ci/check-params-env.sh'
10+
workflow_dispatch:
911

1012
permissions:
1113
contents: read

.github/workflows/runtimes-digest-updater-upstream.yaml

Lines changed: 0 additions & 133 deletions
This file was deleted.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Sync branches through Pull Request
3+
4+
on: # yamllint disable-line rule:truthy
5+
workflow_dispatch:
6+
inputs:
7+
source:
8+
description: Source branch
9+
required: true
10+
target:
11+
description: Target branch
12+
required: true
13+
14+
jobs:
15+
sync:
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
ref: ${{ github.event.inputs.target }}
25+
fetch-depth: 0
26+
27+
- name: Prepare sync branch
28+
id: prepare
29+
run: |
30+
git fetch origin ${{ github.event.inputs.source }}
31+
git reset --hard origin/${{ github.event.inputs.source }}
32+
33+
TIMESTAMP=$(date +'%Y%m%d%H%M%S')
34+
SYNC_BRANCH=sync__${{ github.event.inputs.source }}__${{ github.event.inputs.target }}__${TIMESTAMP}
35+
echo "branch=$SYNC_BRANCH" >> $GITHUB_OUTPUT
36+
37+
- name: Create pull request
38+
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
39+
with:
40+
branch: ${{ steps.prepare.outputs.branch }}
41+
title: "Sync `${{ github.event.inputs.target }}` branch with `${{ github.event.inputs.source }}` branch"
42+
body: |
43+
:robot: This is an automated Pull Request created by `/.github/workflows/sync-branches-through-pr.yml`.
44+
45+
It merges all commits from `${{ github.event.inputs.source }}` branch into `${{ github.event.inputs.target }}` branch.
46+
47+
:warning: **IMPORTANT NOTE**: Remember to delete the `${{ steps.prepare.outputs.branch }}` branch after merging the changes.

Makefile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ endef
5959
# ARG 2: Path of image context we want to build.
6060
# ARG 3: Base image tag name (optional).
6161
define image
62+
$(info #*# Image build directory: <$(2)> #(MACHINE-PARSED LINE)#*#...)
6263
$(call build_image,$(1),$(2),$(3))
6364
$(call push_image,$(1))
6465
endef
@@ -272,6 +273,31 @@ cuda-rstudio-c9s-python-3.9: cuda-c9s-python-3.9
272273
.PHONY: base-rhel9-python-3.9
273274
base-rhel9-python-3.9:
274275
$(call image,$@,base/rhel9-python-3.9)
276+
####################################### Buildchain for AMD Python 3.9 using C9S #######################################
277+
.PHONY: amd-c9s-python-3.9
278+
amd-c9s-python-3.9: base-c9s-python-3.9
279+
$(call image,$@,amd/c9s-python-3.9,$<)
280+
281+
# We are only using c9s base image here onwards,
282+
# DON'T confuse due to the ubi9 mention, it just directory name.
283+
.PHONY: amd-jupyter-minimal-c9s-python-3.9
284+
amd-jupyter-minimal-c9s-python-3.9: amd-c9s-python-3.9
285+
$(call image,$@,jupyter/minimal/ubi9-python-3.9,$<)
286+
287+
# Build and push jupyter-datascience-ubi9-python-3.9 image to the registry
288+
.PHONY: amd-jupyter-datascience-c9s-python-3.9
289+
amd-jupyter-datascience-c9s-python-3.9: amd-jupyter-minimal-c9s-python-3.9
290+
$(call image,$@,jupyter/datascience/ubi9-python-3.9,$<)
291+
292+
# Build and push jupyter-tensorflow-ubi9-python-3.9 image to the registry
293+
.PHONY: amd-jupyter-tensorflow-c9s-python-3.9
294+
amd-jupyter-tensorflow-c9s-python-3.9: amd-jupyter-datascience-c9s-python-3.9
295+
$(call image,$@,jupyter/amd/tensorflow/ubi9-python-3.9,$<)
296+
297+
# Build and push jupyter-pytorch-ubi9-python-3.9 image to the registry
298+
.PHONY: amd-jupyter-pytorch-c9s-python-3.9
299+
amd-jupyter-pytorch-c9s-python-3.9: amd-jupyter-datascience-c9s-python-3.9
300+
$(call image,$@,jupyter/amd/pytorch/ubi9-python-3.9,$<)
275301

276302
####################################### Buildchain for Anaconda Python #######################################
277303

0 commit comments

Comments
 (0)