@@ -14,7 +14,7 @@ RUN cd ./mongodb-cli-mongocli-v${MONGOCLI_VERSION}/ && \
1414####################
1515# base #
1616####################
17- FROM registry.access.redhat.com/ubi9/python-311 :latest AS base
17+ FROM registry.access.redhat.com/ubi9/python-312 :latest AS base
1818
1919WORKDIR /opt/app-root/bin
2020
@@ -32,8 +32,9 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
3232# Other apps and tools installed as default user
3333USER 1001
3434
35- # Install micropipenv to deploy packages from Pipfile.lock
36- RUN pip install --no-cache-dir -U "micropipenv[toml]"
35+ # Install micropipenv and uv to deploy packages from requirements.txt begin
36+ RUN pip install --no-cache-dir -U "micropipenv[toml]==1.9.0" "uv==0.8.12"
37+ # Install micropipenv and uv to deploy packages from requirements.txt end
3738
3839# Install the oc client begin
3940RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -45,7 +46,16 @@ RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/oc
4546####################
4647# cuda-base #
4748####################
48- FROM base AS cuda-base
49+ FROM base AS cuda-base-amd64
50+ ENV NVARCH=x86_64
51+ # cuda-nvprof only gets installed on amd64 currently
52+ ENV NV_NVPROF_VERSION=12.6.80-1
53+ ENV NV_NVPROF_DEV_PACKAGE=cuda-nvprof-12-6-${NV_NVPROF_VERSION}
54+
55+ FROM base AS cuda-base-arm64
56+ ENV NVARCH=sbsa
57+
58+ FROM cuda-base-${TARGETARCH} AS cuda-base
4959
5060ARG TARGETARCH
5161
@@ -56,9 +66,8 @@ ARG CUDA_SOURCE_CODE=cuda
5666USER 0
5767WORKDIR /opt/app-root/bin
5868
59- ENV NVARCH=x86_64
60- ENV NVIDIA_REQUIRE_CUDA "cuda>=12.4 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 brand=tesla,driver>=525,driver<526 brand=unknown,driver>=525,driver<526 brand=nvidia,driver>=525,driver<526 brand=nvidiartx,driver>=525,driver<526 brand=geforce,driver>=525,driver<526 brand=geforcertx,driver>=525,driver<526 brand=quadro,driver>=525,driver<526 brand=quadrortx,driver>=525,driver<526 brand=titan,driver>=525,driver<526 brand=titanrtx,driver>=525,driver<526 brand=tesla,driver>=535,driver<536 brand=unknown,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=geforce,driver>=535,driver<536 brand=geforcertx,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=titan,driver>=535,driver<536 brand=titanrtx,driver>=535,driver<536"
61- ENV NV_CUDA_CUDART_VERSION 12.4.127-1
69+ ENV NVIDIA_REQUIRE_CUDA="cuda>=12.6 brand=unknown,driver>=470,driver<471 brand=grid,driver>=470,driver<471 brand=tesla,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=vapps,driver>=470,driver<471 brand=vpc,driver>=470,driver<471 brand=vcs,driver>=470,driver<471 brand=vws,driver>=470,driver<471 brand=cloudgaming,driver>=470,driver<471 brand=unknown,driver>=535,driver<536 brand=grid,driver>=535,driver<536 brand=tesla,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=vapps,driver>=535,driver<536 brand=vpc,driver>=535,driver<536 brand=vcs,driver>=535,driver<536 brand=vws,driver>=535,driver<536 brand=cloudgaming,driver>=535,driver<536 brand=unknown,driver>=550,driver<551 brand=grid,driver>=550,driver<551 brand=tesla,driver>=550,driver<551 brand=nvidia,driver>=550,driver<551 brand=quadro,driver>=550,driver<551 brand=quadrortx,driver>=550,driver<551 brand=nvidiartx,driver>=550,driver<551 brand=vapps,driver>=550,driver<551 brand=vpc,driver>=550,driver<551 brand=vcs,driver>=550,driver<551 brand=vws,driver>=550,driver<551 brand=cloudgaming,driver>=550,driver<551"
70+ ENV NV_CUDA_CUDART_VERSION=12.6.77-1
6271
6372COPY ${CUDA_SOURCE_CODE}/cuda.repo-${TARGETARCH} /etc/yum.repos.d/cuda.repo
6473COPY ${CUDA_SOURCE_CODE}/NGC-DL-CONTAINER-LICENSE /
@@ -67,12 +76,12 @@ RUN NVIDIA_GPGKEY_SUM=d0664fbbdb8c32356d45de36c5984617217b2d0bef41b93ccecd326ba3
6776 curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/rhel9/${NVARCH}/D42D0685.pub | sed '/^Version/d' > /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA && \
6877 echo "$NVIDIA_GPGKEY_SUM /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" | sha256sum -c --strict -
6978
70- ENV CUDA_VERSION 12.4.1
79+ ENV CUDA_VERSION= 12.6.3
7180
7281# For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a
7382RUN yum upgrade -y && yum install -y \
74- cuda-cudart-12-4 -${NV_CUDA_CUDART_VERSION} \
75- cuda-compat-12-4 \
83+ cuda-cudart-12-6 -${NV_CUDA_CUDART_VERSION} \
84+ cuda-compat-12-6 \
7685 && yum clean all \
7786 && rm -rf /var/cache/yum/*
7887
@@ -89,22 +98,22 @@ ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
8998
9099# Install CUDA runtime from:
91100# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.6.3/ubi9/runtime/Dockerfile
92- ENV NV_CUDA_LIB_VERSION 12.4.1 -1
93- ENV NV_NVTX_VERSION 12.4.127 -1
94- ENV NV_LIBNPP_VERSION 12.2.5.30 -1
95- ENV NV_LIBNPP_PACKAGE libnpp-12-4 -${NV_LIBNPP_VERSION}
96- ENV NV_LIBCUBLAS_VERSION 12.4.5.8 -1
97- ENV NV_LIBNCCL_PACKAGE_NAME libnccl
98- ENV NV_LIBNCCL_PACKAGE_VERSION 2.21.5 -1
99- ENV NV_LIBNCCL_VERSION 2.21.5
100- ENV NCCL_VERSION 2.21.5
101- ENV NV_LIBNCCL_PACKAGE ${NV_LIBNCCL_PACKAGE_NAME}-${NV_LIBNCCL_PACKAGE_VERSION}+cuda12.4
101+ ENV NV_CUDA_LIB_VERSION= 12.6.3 -1
102+ ENV NV_NVTX_VERSION= 12.6.77 -1
103+ ENV NV_LIBNPP_VERSION= 12.3.1.54 -1
104+ ENV NV_LIBNPP_PACKAGE= libnpp-12-6 -${NV_LIBNPP_VERSION}
105+ ENV NV_LIBCUBLAS_VERSION= 12.6.4.1 -1
106+ ENV NV_LIBNCCL_PACKAGE_NAME= libnccl
107+ ENV NV_LIBNCCL_PACKAGE_VERSION=2.23.4 -1
108+ ENV NV_LIBNCCL_VERSION=2.23.4
109+ ENV NCCL_VERSION=2.23.4
110+ ENV NV_LIBNCCL_PACKAGE= ${NV_LIBNCCL_PACKAGE_NAME}-${NV_LIBNCCL_PACKAGE_VERSION}+cuda12.6
102111
103112RUN yum install -y \
104- cuda-libraries-12-4 -${NV_CUDA_LIB_VERSION} \
105- cuda-nvtx-12-4 -${NV_NVTX_VERSION} \
113+ cuda-libraries-12-6 -${NV_CUDA_LIB_VERSION} \
114+ cuda-nvtx-12-6 -${NV_NVTX_VERSION} \
106115 ${NV_LIBNPP_PACKAGE} \
107- libcublas-12-4 -${NV_LIBCUBLAS_VERSION} \
116+ libcublas-12-6 -${NV_LIBCUBLAS_VERSION} \
108117 ${NV_LIBNCCL_PACKAGE} \
109118 && yum clean all \
110119 && rm -rf /var/cache/yum/*
@@ -142,7 +151,7 @@ WORKDIR /opt/app-root/src
142151FROM cuda-base AS cuda-jupyter-minimal
143152
144153ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
145- ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.11
154+ ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.12
146155
147156WORKDIR /opt/app-root/bin
148157
@@ -168,7 +177,7 @@ ENTRYPOINT ["start-notebook.sh"]
168177#############################
169178FROM cuda-jupyter-minimal AS cuda-jupyter-datascience
170179
171- ARG DATASCIENCE_SOURCE_CODE=jupyter/datascience/ubi9-python-3.11
180+ ARG DATASCIENCE_SOURCE_CODE=jupyter/datascience/ubi9-python-3.12
172181
173182WORKDIR /opt/app-root/bin
174183
@@ -201,49 +210,40 @@ WORKDIR /opt/app-root/src
201210#############################
202211FROM cuda-jupyter-datascience AS cuda-jupyter-pytorch
203212
204- ARG DATASCIENCE_SOURCE_CODE=jupyter/datascience/ubi9-python-3.11
205- ARG PYTORCH_SOURCE_CODE=jupyter/pytorch+llmcompressor/ubi9-python-3.11
213+ ARG DATASCIENCE_SOURCE_CODE=jupyter/datascience/ubi9-python-3.12
214+ ARG PYTORCH_SOURCE_CODE=jupyter/pytorch+llmcompressor/ubi9-python-3.12
206215
207216WORKDIR /opt/app-root/bin
208217
209- LABEL name="odh-notebook-jupyter-cuda-pytorch-ubi9-python-3.11 " \
210- summary="Jupyter CUDA pytorch notebook image for ODH notebooks" \
211- description="Jupyter CUDA pytorch notebook image with base Python 3.11 builder image based on UBI9 for ODH notebooks" \
212- io.k8s.display-name="Jupyter CUDA pytorch notebook image for ODH notebooks" \
213- io.k8s.description="Jupyter CUDA pytorch notebook image with base Python 3.11 builder image based on UBI9 for ODH notebooks" \
218+ LABEL name="odh-notebook-jupyter-cuda-pytorch-llmcompressor- ubi9-python-3.12 " \
219+ summary="Jupyter CUDA pytorch-llmcompressor notebook image for ODH notebooks" \
220+ description="Jupyter CUDA pytorch-llmcompressor notebook image with base Python 3.12 builder image based on UBI9 for ODH notebooks" \
221+ io.k8s.display-name="Jupyter CUDA pytorch-llmcompressor notebook image for ODH notebooks" \
222+ io.k8s.description="Jupyter CUDA pytorch-llmcompressor notebook image with base Python 3.12 builder image based on UBI9 for ODH notebooks" \
214223 authoritative-source-url="https://github.com/opendatahub-io/notebooks" \
215224 io.openshift.build.commit.ref="main" \
216- io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/pytorch/ubi9-python-3.11 " \
217- io.openshift.build.image="quay.io/opendatahub/workbench-images:cuda-jupyter-pytorch-ubi9-python-3.11 "
225+ io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/pytorch+llmcompressor /ubi9-python-3.12 " \
226+ io.openshift.build.image="quay.io/opendatahub/workbench-images:cuda-jupyter-pytorch-llmcompressor- ubi9-python-3.12 "
218227
219- # Install Python packages and Jupyterlab extensions from Pipfile.lock
220- COPY ${PYTORCH_SOURCE_CODE}/Pipfile.lock ./
228+ # Install Python packages and Jupyterlab extensions from requirements.txt
229+ COPY ${PYTORCH_SOURCE_CODE}/requirements.txt ./
221230
222231RUN echo "Installing softwares and packages" && \
223- micropipenv install --dev && \
224- rm -f ./Pipfile.lock && \
232+ # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
233+ # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
234+ uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./requirements.txt --build-constraints=./requirements.txt && \
225235 # setup path for runtime configuration
226236 mkdir /opt/app-root/runtimes && \
227237 # Remove default Elyra runtime-images \
228238 rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
229239 # Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
230240 sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
231- # copy jupyter configuration
232- cp /opt/app-root/bin/utils/jupyter_server_config.py /opt/app-root/etc/jupyter && \
233241 # Disable announcement plugin of jupyterlab \
234242 jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
235243 # Apply JupyterLab addons \
236244 /opt/app-root/bin/utils/addons/apply.sh && \
237245 # Fix permissions to support pip in Openshift environments \
238- chmod -R g+w /opt/app-root/lib/python3.11 /site-packages && \
246+ chmod -R g+w /opt/app-root/lib/python3.12 /site-packages && \
239247 fix-permissions /opt/app-root -P
240248
241- # Copy Elyra runtime-images definitions and set the version
242- COPY ${DATASCIENCE_SOURCE_CODE}/runtime-images/ /opt/app-root/share/jupyter/metadata/runtime-images/
243- COPY ${PYTORCH_SOURCE_CODE}/runtime-images/ /opt/app-root/share/jupyter/metadata/runtime-images/
244-
245249WORKDIR /opt/app-root/src
246-
247- # Install micropipenv and uv to deploy packages from requirements.txt begin
248- RUN pip install --no-cache-dir -U "micropipenv[toml]==1.9.0" "uv==0.8.12"
249- # Install micropipenv and uv to deploy packages from requirements.txt end
0 commit comments