Skip to content

Commit fdf988d

Browse files
committed
Use UBI based base image for AMD rocm builds.
- switch to rocm naming convention - adjust the makefile with ubi changes Signed-off-by: Harshad Reddy Nalla <[email protected]>
1 parent a1154b4 commit fdf988d

File tree

20 files changed

+90
-154
lines changed

20 files changed

+90
-154
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636

3737
- name: Free up additional disk space
3838
# https://docs.github.com/en/actions/learn-github-actions/expressions
39-
if: "${{ contains(inputs.target, 'amd') || contains(inputs.target, 'cuda') || contains(inputs.target, 'intel') ||
39+
if: "${{ contains(inputs.target, 'rocm') || contains(inputs.target, 'cuda') || contains(inputs.target, 'intel') ||
4040
contains(inputs.target, 'pytorch') || contains(inputs.target, 'tensorflow') }}"
4141
run: |
4242
set -x

.github/workflows/build-notebooks.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -416,57 +416,57 @@
416416
},
417417
"secrets": "inherit"
418418
},
419-
"amd-c9s-python-3_9": {
419+
"rocm-ubi9-python-3_9": {
420420
"needs": [
421-
"base-c9s-python-3_9"
421+
"base-ubi9-python-3_9"
422422
],
423423
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",
424424
"with": {
425-
"target": "amd-c9s-python-3.9",
425+
"target": "rocm-ubi9-python-3.9",
426426
"github": "${{ toJSON(github) }}"
427427
},
428428
"secrets": "inherit"
429429
},
430-
"amd-jupyter-minimal-c9s-python-3_9": {
430+
"rocm-jupyter-minimal-ubi9-python-3_9": {
431431
"needs": [
432-
"amd-c9s-python-3_9"
432+
"rocm-ubi9-python-3_9"
433433
],
434434
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",
435435
"with": {
436-
"target": "amd-jupyter-minimal-c9s-python-3.9",
436+
"target": "rocm-jupyter-minimal-ubi9-python-3.9",
437437
"github": "${{ toJSON(github) }}"
438438
},
439439
"secrets": "inherit"
440440
},
441-
"amd-jupyter-datascience-c9s-python-3_9": {
441+
"rocm-jupyter-datascience-ubi9-python-3_9": {
442442
"needs": [
443-
"amd-jupyter-minimal-c9s-python-3_9"
443+
"rocm-jupyter-minimal-ubi9-python-3_9"
444444
],
445445
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",
446446
"with": {
447-
"target": "amd-jupyter-datascience-c9s-python-3.9",
447+
"target": "rocm-jupyter-datascience-ubi9-python-3.9",
448448
"github": "${{ toJSON(github) }}"
449449
},
450450
"secrets": "inherit"
451451
},
452-
"amd-jupyter-tensorflow-c9s-python-3_9": {
452+
"rocm-jupyter-tensorflow-ubi9-python-3_9": {
453453
"needs": [
454-
"amd-jupyter-datascience-c9s-python-3_9"
454+
"rocm-jupyter-datascience-ubi9-python-3_9"
455455
],
456456
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",
457457
"with": {
458-
"target": "amd-jupyter-tensorflow-c9s-python-3.9",
458+
"target": "rocm-jupyter-tensorflow-ubi9-python-3.9",
459459
"github": "${{ toJSON(github) }}"
460460
},
461461
"secrets": "inherit"
462462
},
463-
"amd-jupyter-pytorch-c9s-python-3_9": {
463+
"rocm-jupyter-pytorch-ubi9-python-3_9": {
464464
"needs": [
465-
"amd-jupyter-datascience-c9s-python-3_9"
465+
"rocm-jupyter-datascience-ubi9-python-3_9"
466466
],
467467
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",
468468
"with": {
469-
"target": "amd-jupyter-pytorch-c9s-python-3.9",
469+
"target": "rocm-jupyter-pytorch-ubi9-python-3.9",
470470
"github": "${{ toJSON(github) }}"
471471
},
472472
"secrets": "inherit"

Makefile

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -252,31 +252,30 @@ rstudio-c9s-python-3.9: base-c9s-python-3.9
252252
cuda-rstudio-c9s-python-3.9: cuda-c9s-python-3.9
253253
$(call image,$@,rstudio/c9s-python-3.9,$<)
254254

255-
####################################### Buildchain for AMD Python 3.9 using C9S #######################################
256-
.PHONY: amd-c9s-python-3.9
257-
amd-c9s-python-3.9: base-c9s-python-3.9
258-
$(call image,$@,amd/c9s-python-3.9,$<)
259-
260-
# We are only using c9s base image here onwards,
261-
# DON'T confuse due to the ubi9 mention, it just directory name.
262-
.PHONY: amd-jupyter-minimal-c9s-python-3.9
263-
amd-jupyter-minimal-c9s-python-3.9: amd-c9s-python-3.9
255+
####################################### Buildchain for AMD Python 3.9 using UBI9 #######################################
256+
.PHONY: rocm-ubi9-python-3.9
257+
rocm-ubi9-python-3.9: base-ubi9-python-3.9
258+
$(call image,$@,rocm/ubi9-python-3.9,$<)
259+
260+
# We are only using rocm-ubi9 base image here onwards
261+
.PHONY: rocm-jupyter-minimal-ubi9-python-3.9
262+
rocm-jupyter-minimal-ubi9-python-3.9: rocm-ubi9-python-3.9
264263
$(call image,$@,jupyter/minimal/ubi9-python-3.9,$<)
265264

266-
# Build and push jupyter-datascience-ubi9-python-3.9 image to the registry
267-
.PHONY: amd-jupyter-datascience-c9s-python-3.9
268-
amd-jupyter-datascience-c9s-python-3.9: amd-jupyter-minimal-c9s-python-3.9
265+
# Build and push rocm-jupyter-datascience-ubi9-python-3.9 image to the registry
266+
.PHONY: rocm-jupyter-datascience-ubi9-python-3.9
267+
rocm-jupyter-datascience-ubi9-python-3.9: rocm-jupyter-minimal-ubi9-python-3.9
269268
$(call image,$@,jupyter/datascience/ubi9-python-3.9,$<)
270269

271-
# Build and push jupyter-tensorflow-ubi9-python-3.9 image to the registry
272-
.PHONY: amd-jupyter-tensorflow-c9s-python-3.9
273-
amd-jupyter-tensorflow-c9s-python-3.9: amd-jupyter-datascience-c9s-python-3.9
274-
$(call image,$@,jupyter/amd/tensorflow/ubi9-python-3.9,$<)
270+
# Build and push rocm-jupyter-tensorflow-ubi9-python-3.9 image to the registry
271+
.PHONY: rocm-jupyter-tensorflow-ubi9-python-3.9
272+
rocm-jupyter-tensorflow-ubi9-python-3.9: rocm-jupyter-datascience-ubi9-python-3.9
273+
$(call image,$@,jupyter/rocm/tensorflow/ubi9-python-3.9,$<)
275274

276-
# Build and push jupyter-pytorch-ubi9-python-3.9 image to the registry
277-
.PHONY: amd-jupyter-pytorch-c9s-python-3.9
278-
amd-jupyter-pytorch-c9s-python-3.9: amd-jupyter-datascience-c9s-python-3.9
279-
$(call image,$@,jupyter/amd/pytorch/ubi9-python-3.9,$<)
275+
# Build and push rocm-jupyter-pytorch-ubi9-python-3.9 image to the registry
276+
.PHONY: rocm-jupyter-pytorch-ubi9-python-3.9
277+
rocm-jupyter-pytorch-ubi9-python-3.9: rocm-jupyter-datascience-ubi9-python-3.9
278+
$(call image,$@,jupyter/rocm/pytorch/ubi9-python-3.9,$<)
280279

281280
####################################### Buildchain for Anaconda Python #######################################
282281

amd/c9s-python-3.9/Dockerfile

Lines changed: 0 additions & 102 deletions
This file was deleted.

ci/cached-builds/gen_gha_matrix_jobs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ def test_select_changed_targets(self):
198198
changed_files = ["jupyter/datascience/ubi9-python-3.9/Dockerfile"]
199199

200200
leafs = gha_pr_changed_files.filter_out_unchanged(leafs, changed_files)
201-
assert set(leafs) == {'amd-jupyter-pytorch-c9s-python-3.9',
202-
'amd-jupyter-tensorflow-c9s-python-3.9',
201+
assert set(leafs) == {'rocm-jupyter-pytorch-c9s-python-3.9',
202+
'rocm-jupyter-tensorflow-c9s-python-3.9',
203203
'cuda-jupyter-tensorflow-ubi9-python-3.9',
204204
'jupyter-trustyai-ubi9-python-3.9',
205205
'jupyter-pytorch-ubi9-python-3.9'}

jupyter/amd/pytorch/ubi9-python-3.9/Dockerfile renamed to jupyter/rocm/pytorch/ubi9-python-3.9/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
ARG BASE_IMAGE
22
FROM ${BASE_IMAGE}
33

4-
LABEL name="odh-notebook-jupyter-amd-pytorch-ubi9-python-3.9" \
4+
LABEL name="odh-notebook-jupyter-rocm-pytorch-ubi9-python-3.9" \
55
summary="Jupyter AMD pytorch notebook image for ODH notebooks" \
66
description="Jupyter AMD pytorch notebook image with base Python 3.9 builder image based on UBI9 for ODH notebooks" \
77
io.k8s.display-name="Jupyter AMD pytorch notebook image for ODH notebooks" \
88
io.k8s.description="Jupyter AMD pytorch notebook image with base Python 3.9 builder image based on UBI9 for ODH notebooks" \
99
authoritative-source-url="https://github.com/opendatahub-io/notebooks" \
1010
io.openshift.build.commit.ref="main" \
11-
io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/amd/pytorch/ubi9-python-3.9" \
12-
io.openshift.build.image="quay.io/opendatahub/workbench-images:jupyter-amd-pytorch-ubi9-python-3.9"
11+
io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/rocm/pytorch/ubi9-python-3.9" \
12+
io.openshift.build.image="quay.io/opendatahub/workbench-images:rocm-jupyter-pytorch-ubi9-python-3.9"
1313

1414
# Install Python packages and Jupyterlab extensions from Pipfile.lock
1515
COPY Pipfile.lock ./
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
4-
namePrefix: jupyter-amd-pytorch-ubi9-python-3-9-
4+
namePrefix: rocm-jupyter-pytorch-ubi9-python-3-9-
55
commonLabels:
6-
app: jupyter-amd-pytorch-ubi9-python-3-9
6+
app: rocm-jupyter-pytorch-ubi9-python-3-9
77
resources:
88
- service.yaml
99
- statefulset.yaml
1010
images:
1111
- name: quay.io/opendatahub/workbench-images
1212
newName: quay.io/opendatahub/workbench-images
13-
newTag: jupyter-amd-pytorch-ubi9-python-3.9
13+
newTag: rocm-jupyter-pytorch-ubi9-python-3.9

0 commit comments

Comments
 (0)