@@ -14,7 +14,7 @@ RUN cd ./mongodb-cli-mongocli-v${MONGOCLI_VERSION}/ && \
14
14
####################
15
15
# base #
16
16
####################
17
- FROM registry.access.redhat.com/ubi9/python-311 :latest AS base
17
+ FROM registry.access.redhat.com/ubi9/python-312 :latest AS base
18
18
19
19
WORKDIR /opt/app-root/bin
20
20
@@ -32,8 +32,9 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
32
32
# Other apps and tools installed as default user
33
33
USER 1001
34
34
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
37
38
38
39
# Install the oc client begin
39
40
RUN 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
45
46
####################
46
47
# cuda-base #
47
48
####################
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
49
59
50
60
ARG TARGETARCH
51
61
@@ -56,9 +66,8 @@ ARG CUDA_SOURCE_CODE=cuda
56
66
USER 0
57
67
WORKDIR /opt/app-root/bin
58
68
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
62
71
63
72
COPY ${CUDA_SOURCE_CODE}/cuda.repo-${TARGETARCH} /etc/yum.repos.d/cuda.repo
64
73
COPY ${CUDA_SOURCE_CODE}/NGC-DL-CONTAINER-LICENSE /
@@ -67,12 +76,12 @@ RUN NVIDIA_GPGKEY_SUM=d0664fbbdb8c32356d45de36c5984617217b2d0bef41b93ccecd326ba3
67
76
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 && \
68
77
echo "$NVIDIA_GPGKEY_SUM /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" | sha256sum -c --strict -
69
78
70
- ENV CUDA_VERSION 12.4.1
79
+ ENV CUDA_VERSION= 12.6.3
71
80
72
81
# For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a
73
82
RUN 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 \
76
85
&& yum clean all \
77
86
&& rm -rf /var/cache/yum/*
78
87
@@ -89,22 +98,22 @@ ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
89
98
90
99
# Install CUDA runtime from:
91
100
# 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
102
111
103
112
RUN 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} \
106
115
${NV_LIBNPP_PACKAGE} \
107
- libcublas-12-4 -${NV_LIBCUBLAS_VERSION} \
116
+ libcublas-12-6 -${NV_LIBCUBLAS_VERSION} \
108
117
${NV_LIBNCCL_PACKAGE} \
109
118
&& yum clean all \
110
119
&& rm -rf /var/cache/yum/*
@@ -142,7 +151,7 @@ WORKDIR /opt/app-root/src
142
151
FROM cuda-base AS cuda-jupyter-minimal
143
152
144
153
ARG 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
146
155
147
156
WORKDIR /opt/app-root/bin
148
157
@@ -168,7 +177,7 @@ ENTRYPOINT ["start-notebook.sh"]
168
177
#############################
169
178
FROM cuda-jupyter-minimal AS cuda-jupyter-datascience
170
179
171
- ARG DATASCIENCE_SOURCE_CODE=jupyter/datascience/ubi9-python-3.11
180
+ ARG DATASCIENCE_SOURCE_CODE=jupyter/datascience/ubi9-python-3.12
172
181
173
182
WORKDIR /opt/app-root/bin
174
183
@@ -201,49 +210,40 @@ WORKDIR /opt/app-root/src
201
210
#############################
202
211
FROM cuda-jupyter-datascience AS cuda-jupyter-pytorch
203
212
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
206
215
207
216
WORKDIR /opt/app-root/bin
208
217
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" \
214
223
authoritative-source-url="https://github.com/opendatahub-io/notebooks" \
215
224
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 "
218
227
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 ./
221
230
222
231
RUN 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 && \
225
235
# setup path for runtime configuration
226
236
mkdir /opt/app-root/runtimes && \
227
237
# Remove default Elyra runtime-images \
228
238
rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
229
239
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
230
240
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 && \
233
241
# Disable announcement plugin of jupyterlab \
234
242
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
235
243
# Apply JupyterLab addons \
236
244
/opt/app-root/bin/utils/addons/apply.sh && \
237
245
# 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 && \
239
247
fix-permissions /opt/app-root -P
240
248
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
-
245
249
WORKDIR /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