Skip to content

Commit 2095eb5

Browse files
Incorporate rocm-pytorch and rocm-tensorflow runtime images (#626)
* Incorporate rocm-pytorch and rocm-tensorflow runtime images * Commit autogenerated changes from the to update the build-notebooks.yaml * Rename references of amd to rocm as more proper naming
1 parent ae46b71 commit 2095eb5

File tree

20 files changed

+8054
-0
lines changed

20 files changed

+8054
-0
lines changed

.github/workflows/build-notebooks.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,28 @@
471471
},
472472
"secrets": "inherit"
473473
},
474+
"rocm-runtime-pytorch-ubi9-python-3_9": {
475+
"needs": [
476+
"rocm-ubi9-python-3_9"
477+
],
478+
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",
479+
"with": {
480+
"target": "rocm-runtime-pytorch-ubi9-python-3.9",
481+
"github": "${{ toJSON(github) }}"
482+
},
483+
"secrets": "inherit"
484+
},
485+
"rocm-runtime-tensorflow-ubi9-python-3_9": {
486+
"needs": [
487+
"rocm-ubi9-python-3_9"
488+
],
489+
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",
490+
"with": {
491+
"target": "rocm-runtime-tensorflow-ubi9-python-3.9",
492+
"github": "${{ toJSON(github) }}"
493+
},
494+
"secrets": "inherit"
495+
},
474496
"base-anaconda-python-3_8": {
475497
"needs": [],
476498
"uses": "./.github/workflows/build-notebooks-TEMPLATE.yaml",

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,16 @@ rocm-jupyter-tensorflow-ubi9-python-3.9: rocm-jupyter-datascience-ubi9-python-3.
277277
rocm-jupyter-pytorch-ubi9-python-3.9: rocm-jupyter-datascience-ubi9-python-3.9
278278
$(call image,$@,jupyter/rocm/pytorch/ubi9-python-3.9,$<)
279279

280+
# Build and push rocm-jupyter-runtime-pytorch-ubi9-python-3.9 image to the registry
281+
.PHONY: rocm-runtime-pytorch-ubi9-python-3.9
282+
rocm-runtime-pytorch-ubi9-python-3.9: rocm-ubi9-python-3.9
283+
$(call image,$@,runtimes/rocm-pytorch/ubi9-python-3.9,$<)
284+
285+
# Build and push rocm-jupyter-runtime-tensorflow-ubi9-python-3.9 image to the registry
286+
.PHONY: rocm-runtime-tensorflow-ubi9-python-3.9
287+
rocm-runtime-tensorflow-ubi9-python-3.9: rocm-ubi9-python-3.9
288+
$(call image,$@,runtimes/rocm-tensorflow/ubi9-python-3.9,$<)
289+
280290
####################################### Buildchain for Anaconda Python #######################################
281291

282292
# Build and push base-anaconda-python-3.8 image to the registry
@@ -566,6 +576,10 @@ refresh-pipfilelock-files:
566576
cd runtimes/pytorch/ubi8-python-3.8 && pipenv lock
567577
cd runtimes/tensorflow/ubi8-python-3.8 && pipenv lock
568578
cd runtimes/tensorflow/ubi9-python-3.9 && pipenv lock
579+
cd runtimes/rocm-tensorflow/ubi9-python-3.9 && pipenv lock
580+
cd runtimes/rocm-pytorch/ubi9-python-3.9 && pipenv lock
581+
582+
569583

570584
# This is only for the workflow action
571585
# For running manually, set the required environment variables
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
ARG BASE_IMAGE
2+
FROM ${BASE_IMAGE}
3+
4+
LABEL name="odh-notebook-runtime-rocm-pytorch-ubi9-python-3.9" \
5+
summary="Runtime ROCm pytorch notebook image for ODH notebooks" \
6+
description="Runtime ROCm pytorch notebook image with base Python 3.9 builder image based on UBI9 for ODH notebooks" \
7+
io.k8s.display-name="Runtime ROCm pytorch notebook image for ODH notebooks" \
8+
io.k8s.description="Runtime ROCm pytorch notebook image with base Python 3.9 builder image based on UBI9 for ODH notebooks" \
9+
authoritative-source-url="https://github.com/opendatahub-io/notebooks" \
10+
io.openshift.build.commit.ref="main" \
11+
io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/runtimes/rocm-pytorch/ubi9-python-3.9" \
12+
io.openshift.build.image="quay.io/opendatahub/workbench-images:rocm-runtime-pytorch-ubi9-python-3.9"
13+
14+
WORKDIR /opt/app-root/bin
15+
16+
# Install Python packages from Pipfile.lock
17+
COPY Pipfile.lock ./
18+
# Copy Elyra dependencies for air-gapped enviroment
19+
COPY utils ./utils/
20+
21+
RUN echo "Installing softwares and packages" && \
22+
micropipenv install && \
23+
rm -f ./Pipfile.lock && \
24+
# Fix permissions to support pip in Openshift environments \
25+
chmod -R g+w /opt/app-root/lib/python3.9/site-packages && \
26+
fix-permissions /opt/app-root -P
27+
28+
WORKDIR /opt/app-root/src
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[[source]]
7+
url = "https://download.pytorch.org/whl/rocm6.0/"
8+
verify_ssl = true
9+
name = "pytorch"
10+
11+
[dev-packages]
12+
13+
[packages]
14+
# PyTorch packages
15+
tensorboard = "~=2.16.2"
16+
torch = {version = "~=2.3.1", index = "pytorch"}
17+
torchvision = {version = "~=0.18.1", index = "pytorch"} # https://pytorch.org/get-started/previous-versions/#linux-and-windows-1
18+
19+
# Datascience and useful extensions
20+
boto3 = "~=1.34.50"
21+
kafka-python = "~=2.0.2"
22+
matplotlib = "~=3.8.3"
23+
numpy = "~=1.26.4"
24+
pandas = "~=2.2.0"
25+
plotly = "~=5.20.0"
26+
scikit-learn = "~=1.4.0"
27+
scipy = "~=1.12.0"
28+
skl2onnx = "~=1.16.0"
29+
onnxconverter-common = "~=1.13.0" # Required for skl2onnx, as upgraded version is not compatible with protobuf
30+
codeflare-sdk = "~=0.16.4"
31+
memray = "~=1.10.0" # any version above this would cause issue with rich package
32+
33+
# DB connectors
34+
pymongo = "~=4.6.2"
35+
psycopg = "~=3.1.18"
36+
pyodbc = "~=5.1.0"
37+
mysql-connector-python = "~=8.3.0"
38+
39+
# This is a comprehensive list of python dependencies that Elyra requires to execute Jupyter notebooks.
40+
ipykernel = "==6.13.0"
41+
ipython = "==8.10.0"
42+
ipython-genutils = "==0.2.0"
43+
jinja2 = "==3.1.4"
44+
jupyter-client = "==7.3.1"
45+
jupyter-core = "==4.11.2"
46+
MarkupSafe = "==2.1.1"
47+
minio = "==7.1.15"
48+
nbclient = "==0.6.3"
49+
nbconvert = "==7.1.0"
50+
nbformat = "==5.4.0"
51+
papermill = "==2.3.4"
52+
pyzmq = "==24.0.1"
53+
prompt-toolkit = "==3.0.30"
54+
requests = "==2.31.0"
55+
tornado = "==6.3.3"
56+
traitlets = "==5.1.1"
57+
urllib3 = "==1.26.18"
58+
59+
[requires]
60+
python_version = "3.9"

0 commit comments

Comments
 (0)