Skip to content

Commit 6e0a8bf

Browse files
dibryantjiridanekgithub-actions[bot]
authored
RHOAIENG-28583: create Runtime Pipeline images for Python 3.12 (#1333)
Co-authored-by: Jiri Daněk <[email protected]> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
1 parent 53c7b62 commit 6e0a8bf

Some content is hidden

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

66 files changed

+40783
-39
lines changed

Makefile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -416,17 +416,18 @@ else ifeq ($(PYTHON_VERSION), 3.12)
416416
jupyter/datascience/ubi9-python-$(PYTHON_VERSION) \
417417
jupyter/pytorch/ubi9-python-$(PYTHON_VERSION) \
418418
jupyter/tensorflow/ubi9-python-$(PYTHON_VERSION) \
419+
jupyter/trustyai/ubi9-python-$(PYTHON_VERSION) \
419420
jupyter/rocm/pytorch/ubi9-python-$(PYTHON_VERSION) \
420421
codeserver/ubi9-python-$(PYTHON_VERSION) \
421-
jupyter/rocm/pytorch/ubi9-python-$(PYTHON_VERSION) \
422-
jupyter/trustyai/ubi9-python-$(PYTHON_VERSION)
422+
runtimes/minimal/ubi9-python-$(PYTHON_VERSION) \
423+
runtimes/datascience/ubi9-python-$(PYTHON_VERSION) \
424+
runtimes/pytorch/ubi9-python-$(PYTHON_VERSION) \
425+
runtimes/tensorflow/ubi9-python-$(PYTHON_VERSION) \
426+
runtimes/rocm-pytorch/ubi9-python-$(PYTHON_VERSION)
423427
# jupyter/rocm/tensorflow/ubi9-python-$(PYTHON_VERSION)
424-
# runtimes/minimal/ubi9-python-$(PYTHON_VERSION)
425-
# runtimes/datascience/ubi9-python-$(PYTHON_VERSION)
426-
# runtimes/pytorch/ubi9-python-$(PYTHON_VERSION)
427-
# runtimes/tensorflow/ubi9-python-$(PYTHON_VERSION)
428+
# rstudio/rhel9-python-$(PYTHON_VERSION)
429+
# rstudio/c9s-python-$(PYTHON_VERSION)
428430
# runtimes/rocm-tensorflow/ubi9-python-$(PYTHON_VERSION)
429-
# runtimes/rocm-pytorch/ubi9-python-$(PYTHON_VERSION)
430431
else
431432
$(error Invalid Python version $(PYTHON_VERSION))
432433
endif
@@ -505,21 +506,20 @@ all-images: \
505506
cuda-jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
506507
cuda-jupyter-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION) \
507508
cuda-jupyter-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
508-
rocm-jupyter-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
509509
codeserver-ubi9-python-$(RELEASE_PYTHON_VERSION) \
510+
jupyter-trustyai-ubi9-python-$(RELEASE_PYTHON_VERSION) \
511+
runtime-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
512+
runtime-datascience-ubi9-python-$(RELEASE_PYTHON_VERSION) \
513+
runtime-cuda-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
514+
runtime-cuda-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION) \
515+
rocm-jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
510516
rocm-jupyter-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
511-
jupyter-trustyai-ubi9-python-$(RELEASE_PYTHON_VERSION)
512-
# runtime-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION)
513-
# runtime-datascience-ubi9-python-$(RELEASE_PYTHON_VERSION)
514-
# runtime-cuda-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION)
515-
# runtime-cuda-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION)
517+
rocm-runtime-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION)
516518
# rstudio-c9s-python-$(RELEASE_PYTHON_VERSION)
517519
# cuda-rstudio-c9s-python-$(RELEASE_PYTHON_VERSION)
518520
# rstudio-rhel9-python-$(RELEASE_PYTHON_VERSION)
519521
# cuda-rstudio-rhel9-python-$(RELEASE_PYTHON_VERSION)
520-
# rocm-jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION)
521522
# rocm-jupyter-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION)
522-
# rocm-runtime-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION)
523523
# rocm-runtime-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION)
524524
else
525525
$(error Invalid Python version $(RELEASE_PYTHON_VERSION))

manifests/base/runtime-datascience-imagestream.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
opendatahub.io/runtime-image: "true"
77
annotations:
88
opendatahub.io/runtime-image-url: "https://github.com//opendatahub-io/notebooks/tree/main/runtimes"
9-
opendatahub.io/runtime-image-name: "Datascience with Python 3.11 (UBI9)"
9+
opendatahub.io/runtime-image-name: "Datascience with Python 3.12 (UBI9)"
1010
opendatahub.io/runtime-image-desc: "Datascience runtime image for Elyra, enabling pipeline execution from Workbenches with a set of advanced AI/ML data science libraries, supporting different runtimes for various pipeline nodes."
1111
name: runtime-datascience
1212
spec:
@@ -18,12 +18,12 @@ spec:
1818
opendatahub.io/runtime-image-metadata: |
1919
[
2020
{
21-
"display_name": "Datascience with Python 3.11 (UBI9)",
21+
"display_name": "Datascience with Python 3.12 (UBI9)",
2222
"metadata": {
2323
"tags": [
2424
"datascience"
2525
],
26-
"display_name": "Datascience with Python 3.11 (UBI9)",
26+
"display_name": "Datascience with Python 3.12 (UBI9)",
2727
"pull_policy": "IfNotPresent"
2828
},
2929
"schema_name": "runtime-image"
@@ -32,7 +32,7 @@ spec:
3232
openshift.io/imported-from: quay.io/opendatahub/workbench-images
3333
from:
3434
kind: DockerImage
35-
name: odh-pipeline-runtime-datascience-cpu-py311-ubi9-n_PLACEHOLDER
35+
name: odh-pipeline-runtime-datascience-cpu-py312-ubi9-n_PLACEHOLDER
3636
name: "datascience"
3737
referencePolicy:
3838
type: Source

manifests/base/runtime-minimal-imagestream.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
opendatahub.io/runtime-image: "true"
77
annotations:
88
opendatahub.io/runtime-image-url: "https://github.com//opendatahub-io/notebooks/tree/main/runtimes"
9-
opendatahub.io/runtime-image-name: "Python 3.11 (UBI9)"
9+
opendatahub.io/runtime-image-name: "Python 3.12 (UBI9)"
1010
opendatahub.io/runtime-image-desc: "Minimal runtime image for Elyra, enabling pipeline execution from Workbenches with minimal dependency set to start experimenting with, for various pipeline nodes."
1111
name: runtime-minimal
1212
spec:
@@ -18,12 +18,12 @@ spec:
1818
opendatahub.io/runtime-image-metadata: |
1919
[
2020
{
21-
"display_name": "Python 3.11 (UBI9)",
21+
"display_name": "Python 3.12 (UBI9)",
2222
"metadata": {
2323
"tags": [
2424
"minimal"
2525
],
26-
"display_name": "Python 3.11 (UBI9)",
26+
"display_name": "Python 3.12 (UBI9)",
2727
"pull_policy": "IfNotPresent"
2828
},
2929
"schema_name": "runtime-image"
@@ -32,7 +32,7 @@ spec:
3232
openshift.io/imported-from: quay.io/opendatahub/workbench-images
3333
from:
3434
kind: DockerImage
35-
name: odh-pipeline-runtime-minimal-cpu-py311-ubi9-n_PLACEHOLDER
35+
name: odh-pipeline-runtime-minimal-cpu-py312-ubi9-n_PLACEHOLDER
3636
name: "minimal"
3737
referencePolicy:
3838
type: Source

manifests/base/runtime-pytorch-imagestream.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
opendatahub.io/runtime-image: "true"
77
annotations:
88
opendatahub.io/runtime-image-url: "https://github.com//opendatahub-io/notebooks/tree/main/runtimes"
9-
opendatahub.io/runtime-image-name: "PyTorch with CUDA and Python 3.11 (UBI9)"
9+
opendatahub.io/runtime-image-name: "PyTorch with CUDA and Python 3.12 (UBI9)"
1010
opendatahub.io/runtime-image-desc: "PyTorch runtime image for Elyra, enabling pipeline execution from Workbenches with PyTorch libraries and dependencies, supporting different runtimes for various pipeline nodes."
1111
name: runtime-pytorch
1212
spec:
@@ -18,12 +18,12 @@ spec:
1818
opendatahub.io/runtime-image-metadata: |
1919
[
2020
{
21-
"display_name": "PyTorch with CUDA and Python 3.11 (UBI9)",
21+
"display_name": "PyTorch with CUDA and Python 3.12 (UBI9)",
2222
"metadata": {
2323
"tags": [
2424
"pytorch"
2525
],
26-
"display_name": "PyTorch with CUDA and Python 3.11 (UBI9)",
26+
"display_name": "PyTorch with CUDA and Python 3.12 (UBI9)",
2727
"pull_policy": "IfNotPresent"
2828
},
2929
"schema_name": "runtime-image"
@@ -32,7 +32,7 @@ spec:
3232
openshift.io/imported-from: quay.io/opendatahub/workbench-images
3333
from:
3434
kind: DockerImage
35-
name: odh-pipeline-runtime-pytorch-cuda-py311-ubi9-n_PLACEHOLDER
35+
name: odh-pipeline-runtime-pytorch-cuda-py312-ubi9-n_PLACEHOLDER
3636
name: "pytorch"
3737
referencePolicy:
3838
type: Source

manifests/base/runtime-rocm-pytorch-imagestream.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
opendatahub.io/runtime-image: "true"
77
annotations:
88
opendatahub.io/runtime-image-url: "https://github.com//opendatahub-io/notebooks/tree/main/runtimes"
9-
opendatahub.io/runtime-image-name: "PyTorch with ROCm and Python 3.11 (UBI9)"
9+
opendatahub.io/runtime-image-name: "PyTorch with ROCm and Python 3.12 (UBI9)"
1010
opendatahub.io/runtime-image-desc: "ROCm optimized PyTorch runtime image for Elyra, enabling pipeline execution from Workbenches with PyTorch libraries and dependencies, supporting different runtimes for various pipeline nodes."
1111
name: runtime-rocm-pytorch
1212
spec:
@@ -18,12 +18,12 @@ spec:
1818
opendatahub.io/runtime-image-metadata: |
1919
[
2020
{
21-
"display_name": "PyTorch with ROCm and Python 3.11 (UBI9)",
21+
"display_name": "PyTorch with ROCm and Python 3.12 (UBI9)",
2222
"metadata": {
2323
"tags": [
2424
"rocm-pytorch"
2525
],
26-
"display_name": "PyTorch with ROCm and Python 3.11 (UBI9)",
26+
"display_name": "PyTorch with ROCm and Python 3.12 (UBI9)",
2727
"pull_policy": "IfNotPresent"
2828
},
2929
"schema_name": "runtime-image"
@@ -32,7 +32,7 @@ spec:
3232
openshift.io/imported-from: quay.io/opendatahub/workbench-images
3333
from:
3434
kind: DockerImage
35-
name: odh-pipeline-runtime-pytorch-rocm-py311-ubi9-n_PLACEHOLDER
35+
name: odh-pipeline-runtime-pytorch-rocm-py312-ubi9-n_PLACEHOLDER
3636
name: "rocm-pytorch"
3737
referencePolicy:
3838
type: Source

manifests/base/runtime-rocm-tensorflow-imagestream.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
annotations:
88
# TODO: once the restraction takes a final shape need to update that url
99
opendatahub.io/runtime-image-url: "https://github.com//opendatahub-io/notebooks/tree/main/runtimes"
10-
opendatahub.io/runtime-image-name: "TensorFlow with ROCm and Python 3.11 (UBI9)"
10+
opendatahub.io/runtime-image-name: "TensorFlow with ROCm and Python 3.12 (UBI9)"
1111
opendatahub.io/runtime-image-desc: "ROCm optimized TensorFlow runtime image for Elyra, enabling pipeline execution from Workbenches with TensorFlow libraries and dependencies, supporting different runtimes for various pipeline nodes."
1212
name: runtime-rocm-tensorflow
1313
spec:
@@ -19,12 +19,12 @@ spec:
1919
opendatahub.io/runtime-image-metadata: |
2020
[
2121
{
22-
"display_name": "TensorFlow with ROCm and Python 3.11 (UBI9)",
22+
"display_name": "TensorFlow with ROCm and Python 3.12 (UBI9)",
2323
"metadata": {
2424
"tags": [
2525
"rocm-tensorflow"
2626
],
27-
"display_name": "TensorFlow with ROCm and Python 3.11 (UBI9)",
27+
"display_name": "TensorFlow with ROCm and Python 3.12 (UBI9)",
2828
"pull_policy": "IfNotPresent"
2929
},
3030
"schema_name": "runtime-image"
@@ -33,7 +33,7 @@ spec:
3333
openshift.io/imported-from: quay.io/opendatahub/workbench-images
3434
from:
3535
kind: DockerImage
36-
name: odh-pipeline-runtime-tensorflow-rocm-py311-ubi9-n_PLACEHOLDER
36+
name: odh-pipeline-runtime-tensorflow-rocm-py312-ubi9-n_PLACEHOLDER
3737
name: "rocm-tensorflow"
3838
referencePolicy:
3939
type: Source

manifests/base/runtime-tensorflow-imagestream.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
annotations:
88
# TODO: once the restraction takes a final shape need to update that url
99
opendatahub.io/runtime-image-url: "https://github.com//opendatahub-io/notebooks/tree/main/runtimes"
10-
opendatahub.io/runtime-image-name: "TensorFlow with CUDA and Python 3.11 (UBI9)"
10+
opendatahub.io/runtime-image-name: "TensorFlow with CUDA and Python 3.12 (UBI9)"
1111
opendatahub.io/runtime-image-desc: "TensorFlow runtime image for Elyra, enabling pipeline execution from Workbenches with TensorFlow libraries and dependencies, supporting different runtimes for various pipeline nodes."
1212
name: runtime-tensorflow
1313
spec:
@@ -19,12 +19,12 @@ spec:
1919
opendatahub.io/runtime-image-metadata: |
2020
[
2121
{
22-
"display_name": "TensorFlow with CUDA and Python 3.11 (UBI9)",
22+
"display_name": "TensorFlow with CUDA and Python 3.12 (UBI9)",
2323
"metadata": {
2424
"tags": [
2525
"tensorflow"
2626
],
27-
"display_name": "TensorFlow with CUDA and Python 3.11 (UBI9)",
27+
"display_name": "TensorFlow with CUDA and Python 3.12 (UBI9)",
2828
"pull_policy": "IfNotPresent"
2929
},
3030
"schema_name": "runtime-image"
@@ -33,7 +33,7 @@ spec:
3333
openshift.io/imported-from: quay.io/opendatahub/workbench-images
3434
from:
3535
kind: DockerImage
36-
name: odh-pipeline-runtime-tensorflow-cuda-py311-ubi9-n_PLACEHOLDER
36+
name: odh-pipeline-runtime-tensorflow-cuda-py312-ubi9-n_PLACEHOLDER
3737
name: "tensorflow"
3838
referencePolicy:
3939
type: Source
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
####################
2+
# base #
3+
####################
4+
FROM registry.access.redhat.com/ubi9/python-312:latest AS base
5+
6+
WORKDIR /opt/app-root/bin
7+
8+
# OS Packages needs to be installed as root
9+
USER 0
10+
11+
# Install useful OS packages
12+
RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
13+
14+
# Other apps and tools installed as default user
15+
USER 1001
16+
17+
# Install micropipenv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]"
19+
20+
# Install the oc client
21+
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
22+
-o /tmp/openshift-client-linux.tar.gz && \
23+
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
24+
rm -f /tmp/openshift-client-linux.tar.gz
25+
26+
#######################
27+
# runtime-datascience #
28+
#######################
29+
FROM base AS runtime-datascience
30+
31+
ARG DATASCIENCE_SOURCE_CODE=runtimes/datascience/ubi9-python-3.12
32+
33+
LABEL name="odh-notebook-runtime-datascience-ubi9-python-3.12" \
34+
summary="Runtime data science notebook image for ODH notebooks" \
35+
description="Runtime data science notebook image with base Python 3.12 builder image based on UBI9 for ODH notebooks" \
36+
io.k8s.display-name="Runtime data science notebook image for ODH notebooks" \
37+
io.k8s.description="Runtime data science notebook image with base Python 3.12 builder image based on UBI9 for ODH notebooks" \
38+
authoritative-source-url="https://github.com/opendatahub-io/notebooks" \
39+
io.openshift.build.commit.ref="main" \
40+
io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/runtimes/datascience/ubi9-python-3.12" \
41+
io.openshift.build.image="quay.io/opendatahub/workbench-images:runtime-datascience-ubi9-python-3.12"
42+
43+
WORKDIR /opt/app-root/bin
44+
45+
# Install Python packages from Pipfile.lock
46+
COPY ${DATASCIENCE_SOURCE_CODE}/Pipfile.lock ./
47+
# Copy Elyra dependencies for air-gapped enviroment
48+
COPY ${DATASCIENCE_SOURCE_CODE}/utils ./utils/
49+
50+
RUN echo "Installing softwares and packages" && \
51+
micropipenv install && \
52+
rm -f ./Pipfile.lock && \
53+
# Fix permissions to support pip in Openshift environments \
54+
chmod -R g+w /opt/app-root/lib/python3.12/site-packages && \
55+
fix-permissions /opt/app-root -P
56+
57+
WORKDIR /opt/app-root/src
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[dev-packages]
7+
8+
[packages]
9+
# Datascience and useful extensions
10+
boto3 = "~=1.37.8"
11+
kafka-python-ng = "~=2.2.3"
12+
matplotlib = "~=3.10.1"
13+
numpy = "~=2.2.3"
14+
pandas = "~=2.2.3"
15+
plotly = "~=6.0.0"
16+
scikit-learn = "~=1.6.1"
17+
scipy = "~=1.15.2"
18+
skl2onnx = "~=1.18.0"
19+
onnxconverter-common = "~=1.13.0" # Required for skl2onnx, as upgraded version is not compatible with protobuf
20+
codeflare-sdk = "~=0.29.0"
21+
22+
# DB connectors
23+
pymongo = "~=4.11.2"
24+
psycopg = "~=3.2.5"
25+
pyodbc = "~=5.2.0"
26+
mysql-connector-python = "~=9.3.0"
27+
28+
# This is a comprehensive list of python dependencies that Elyra requires to execute Jupyter notebooks.
29+
ipykernel = "~=6.29.5"
30+
ipython = "~=9.0.1"
31+
ipython-genutils = "~=0.2.0"
32+
jinja2 = "~=3.1.6"
33+
jupyter-client = ">=8.6.3"
34+
jupyter-core = "~=5.7.2"
35+
MarkupSafe = "~=3.0.2"
36+
minio = "~=7.2.15"
37+
nbclient = "~=0.10.2"
38+
nbconvert = "~=7.16.6"
39+
nbformat = "~=5.10.4"
40+
papermill = "~=2.6.0"
41+
pyzmq = "~=26.2.1"
42+
prompt-toolkit = "~=3.0.50"
43+
requests = "~=2.32.3"
44+
tornado = "~=6.5.1"
45+
traitlets = "~=5.14.3"
46+
urllib3 = "~=2.5.0"
47+
48+
# Base packages
49+
setuptools = "==78.1.1"
50+
wheel = "==0.45.1"
51+
52+
[requires]
53+
python_version = "3.12"

0 commit comments

Comments
 (0)