Skip to content

Commit 2f29891

Browse files
committed
Merge remote-tracking branch 'upstream/main' into rhoai-2.24
2 parents a332806 + 553a17f commit 2f29891

32 files changed

+362
-120
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ ifeq ($(PYTHON_VERSION), 3.11)
407407
jupyter/pytorch/ubi9-python-$(PYTHON_VERSION) \
408408
jupyter/tensorflow/ubi9-python-$(PYTHON_VERSION) \
409409
jupyter/trustyai/ubi9-python-$(PYTHON_VERSION) \
410-
jupyter/pytorch+llmcompressor/ubi9-python-$(PYTHON_VERSION) \
411410
jupyter/rocm/tensorflow/ubi9-python-$(PYTHON_VERSION) \
412411
jupyter/rocm/pytorch/ubi9-python-$(PYTHON_VERSION) \
413412
codeserver/ubi9-python-$(PYTHON_VERSION) \
@@ -416,7 +415,6 @@ ifeq ($(PYTHON_VERSION), 3.11)
416415
runtimes/minimal/ubi9-python-$(PYTHON_VERSION) \
417416
runtimes/datascience/ubi9-python-$(PYTHON_VERSION) \
418417
runtimes/pytorch/ubi9-python-$(PYTHON_VERSION) \
419-
runtimes/pytorch+llmcompressor/ubi9-python-$(PYTHON_VERSION) \
420418
runtimes/tensorflow/ubi9-python-$(PYTHON_VERSION) \
421419
runtimes/rocm-tensorflow/ubi9-python-$(PYTHON_VERSION) \
422420
runtimes/rocm-pytorch/ubi9-python-$(PYTHON_VERSION)
@@ -428,12 +426,14 @@ else ifeq ($(PYTHON_VERSION), 3.12)
428426
jupyter/tensorflow/ubi9-python-$(PYTHON_VERSION) \
429427
jupyter/trustyai/ubi9-python-$(PYTHON_VERSION) \
430428
jupyter/rocm/pytorch/ubi9-python-$(PYTHON_VERSION) \
429+
jupyter/pytorch+llmcompressor/ubi9-python-$(PYTHON_VERSION) \
431430
codeserver/ubi9-python-$(PYTHON_VERSION) \
432431
runtimes/minimal/ubi9-python-$(PYTHON_VERSION) \
433432
runtimes/datascience/ubi9-python-$(PYTHON_VERSION) \
434433
runtimes/pytorch/ubi9-python-$(PYTHON_VERSION) \
435434
runtimes/tensorflow/ubi9-python-$(PYTHON_VERSION) \
436-
runtimes/rocm-pytorch/ubi9-python-$(PYTHON_VERSION)
435+
runtimes/rocm-pytorch/ubi9-python-$(PYTHON_VERSION) \
436+
runtimes/pytorch+llmcompressor/ubi9-python-$(PYTHON_VERSION)
437437
# runtimes/rocm-tensorflow/ubi9-python-$(PYTHON_VERSION)
438438
# jupyter/rocm/tensorflow/ubi9-python-$(PYTHON_VERSION)
439439
# rstudio/rhel9-python-$(PYTHON_VERSION)
@@ -494,12 +494,10 @@ all-images: \
494494
cuda-jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
495495
cuda-jupyter-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION) \
496496
cuda-jupyter-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
497-
cuda-jupyter-pytorch-llmcompressor-ubi9-python-$(RELEASE_PYTHON_VERSION) \
498497
jupyter-trustyai-ubi9-python-$(RELEASE_PYTHON_VERSION) \
499498
runtime-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
500499
runtime-datascience-ubi9-python-$(RELEASE_PYTHON_VERSION) \
501500
runtime-cuda-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
502-
runtime-cuda-pytorch-llmcompressor-ubi9-python-$(RELEASE_PYTHON_VERSION) \
503501
runtime-cuda-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION) \
504502
codeserver-ubi9-python-$(RELEASE_PYTHON_VERSION) \
505503
rstudio-c9s-python-$(RELEASE_PYTHON_VERSION) \
@@ -518,12 +516,14 @@ all-images: \
518516
cuda-jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
519517
cuda-jupyter-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION) \
520518
cuda-jupyter-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
519+
cuda-jupyter-pytorch-llmcompressor-ubi9-python-$(RELEASE_PYTHON_VERSION) \
521520
codeserver-ubi9-python-$(RELEASE_PYTHON_VERSION) \
522521
jupyter-trustyai-ubi9-python-$(RELEASE_PYTHON_VERSION) \
523522
runtime-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
524523
runtime-datascience-ubi9-python-$(RELEASE_PYTHON_VERSION) \
525524
runtime-cuda-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
526525
runtime-cuda-tensorflow-ubi9-python-$(RELEASE_PYTHON_VERSION) \
526+
runtime-cuda-pytorch-llmcompressor-ubi9-python-$(RELEASE_PYTHON_VERSION) \
527527
rocm-jupyter-minimal-ubi9-python-$(RELEASE_PYTHON_VERSION) \
528528
rocm-jupyter-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION) \
529529
rocm-runtime-pytorch-ubi9-python-$(RELEASE_PYTHON_VERSION)

ci/check-params-env.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ PARAMS_ENV_PATH="manifests/base/params.env"
2727

2828
# This value needs to be updated everytime we deliberately change number of the
2929
# images we want to have in the `params.env` or `params-latest.env` file.
30-
EXPECTED_NUM_RECORDS=65
30+
EXPECTED_NUM_RECORDS=67
3131
EXPECTED_ADDI_RUNTIME_RECORDS=0
3232

3333
# Number of attempts for the skopeo tool to gather data from the repository.
@@ -401,6 +401,12 @@ function check_image_variable_matches_name_and_commitref_and_size() {
401401
expected_build_name="konflux"
402402
expected_img_size=971
403403
;;
404+
odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-ubi9-n)
405+
expected_name="odh-notebook-jupyter-cuda-pytorch-llmcompressor-ubi9-python-3.12"
406+
expected_commitref="main"
407+
expected_build_name="konflux"
408+
expected_img_size=6977
409+
;;
404410
odh-workbench-jupyter-minimal-rocm-py311-ubi9-n)
405411
expected_name="odh-notebook-jupyter-rocm-minimal-ubi9-python-3.11"
406412
expected_commitref="main"
@@ -516,6 +522,12 @@ function check_image_variable_matches_name_and_commitref_and_size() {
516522
expected_build_name="konflux"
517523
expected_img_size=6705
518524
;;
525+
odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-ubi9-n)
526+
expected_name="odh-notebook-runtime-cuda-pytorch-llmcompressor-ubi9-python-3.12"
527+
expected_commitref="main"
528+
expected_build_name="konflux"
529+
expected_img_size=6265
530+
;;
519531
*)
520532
echo "Unimplemented variable name: '${image_variable}'"
521533
return 1
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "fc39f0e9",
7+
"metadata": {
8+
"vscode": {
9+
"languageId": "plaintext"
10+
}
11+
},
12+
"outputs": [],
13+
"source": [
14+
"import os\n",
15+
"import unittest\n",
16+
"from transformers import AutoModelForCausalLM, AutoTokenizer\n",
17+
"from llmcompressor.modifiers.quantization import QuantizationModifier\n",
18+
"from llmcompressor.transformers import oneshot\n",
19+
"\n",
20+
"class TestQuantizationProcess(unittest.TestCase):\n",
21+
"\n",
22+
" def test_quantization_and_save(self):\n",
23+
" # Load model\n",
24+
" model_stub = \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\"\n",
25+
" model_name = model_stub.split(\"/\")[-1]\n",
26+
"\n",
27+
" model = AutoModelForCausalLM.from_pretrained(\n",
28+
" model_stub,\n",
29+
" torch_dtype=\"auto\",\n",
30+
" )\n",
31+
"\n",
32+
" tokenizer = AutoTokenizer.from_pretrained(model_stub)\n",
33+
"\n",
34+
" # Configure the quantization algorithm and scheme\n",
35+
" recipe = QuantizationModifier(\n",
36+
" targets=\"Linear\",\n",
37+
" scheme=\"FP8_DYNAMIC\",\n",
38+
" ignore=[\"lm_head\"],\n",
39+
" )\n",
40+
"\n",
41+
" # Apply quantization\n",
42+
" oneshot(\n",
43+
" model=model,\n",
44+
" recipe=recipe,\n",
45+
" )\n",
46+
"\n",
47+
" # Save to disk in compressed-tensors format\n",
48+
" save_path = model_name + \"-FP8-dynamic\"\n",
49+
" model.save_pretrained(save_path)\n",
50+
" tokenizer.save_pretrained(save_path)\n",
51+
"\n",
52+
" # Assertions to verify save\n",
53+
" self.assertTrue(os.path.exists(save_path), f\"Save path does not exist: {save_path}\")\n",
54+
" self.assertTrue(os.path.exists(os.path.join(save_path, \"config.json\")), \"Model config not found\")\n",
55+
" self.assertTrue(os.path.exists(os.path.join(save_path, \"tokenizer_config.json\")), \"Tokenizer config not found\")\n",
56+
"\n",
57+
"unittest.main(argv=[''], verbosity=2, exit=False)\n"
58+
]
59+
},
60+
{
61+
"cell_type": "code",
62+
"execution_count": null,
63+
"id": "f7bc63bb",
64+
"metadata": {
65+
"vscode": {
66+
"languageId": "plaintext"
67+
}
68+
},
69+
"outputs": [],
70+
"source": []
71+
}
72+
],
73+
"metadata": {
74+
"language_info": {
75+
"name": "python"
76+
}
77+
},
78+
"nbformat": 4,
79+
"nbformat_minor": 5
80+
}

jupyter/pytorch+llmcompressor/ubi9-python-3.11/runtime-images/llmcompressor-pytorch-ubi9-py311.json

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

jupyter/pytorch+llmcompressor/ubi9-python-3.11/Dockerfile.cuda renamed to jupyter/pytorch+llmcompressor/ubi9-python-3.12/Dockerfile.cuda

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -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

1919
WORKDIR /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
3333
USER 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
3940
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
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

5060
ARG TARGETARCH
5161

@@ -56,9 +66,8 @@ ARG CUDA_SOURCE_CODE=cuda
5666
USER 0
5767
WORKDIR /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

6372
COPY ${CUDA_SOURCE_CODE}/cuda.repo-${TARGETARCH} /etc/yum.repos.d/cuda.repo
6473
COPY ${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
7382
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 \
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

103112
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} \
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
142151
FROM cuda-base AS cuda-jupyter-minimal
143152

144153
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
146155

147156
WORKDIR /opt/app-root/bin
148157

@@ -168,7 +177,7 @@ ENTRYPOINT ["start-notebook.sh"]
168177
#############################
169178
FROM 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

173182
WORKDIR /opt/app-root/bin
174183

@@ -201,49 +210,40 @@ WORKDIR /opt/app-root/src
201210
#############################
202211
FROM 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

207216
WORKDIR /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

222231
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 && \
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-
245249
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

jupyter/pytorch+llmcompressor/ubi9-python-3.11/Pipfile renamed to jupyter/pytorch+llmcompressor/ubi9-python-3.12/Pipfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ torch = {version = "==2.6.0", index = "pytorch"}
1919
torchvision = {version = "==0.21.0", index = "pytorch"}
2020

2121
# llmcompressor packages
22-
llmcompressor = "~=0.5.1"
22+
llmcompressor = "~=0.6.0"
2323
lm-eval = "~=0.4.8"
2424
loguru = "*"
2525
pyyaml = ">=5.0.0"
@@ -37,7 +37,7 @@ boto3 = "~=1.37.8"
3737
kafka-python-ng = "~=2.2.3"
3838
kfp = "~=2.12.1"
3939
matplotlib = "~=3.10.1"
40-
numpy = "<2.0"
40+
numpy = "<2.0.0"
4141
pandas = "~=2.2.3"
4242
plotly = "~=6.0.0"
4343
scikit-learn = "~=1.6.1"
@@ -73,4 +73,4 @@ wheel = "~=0.45.1"
7373
setuptools = "~=78.1.1"
7474

7575
[requires]
76-
python_version = "3.11"
76+
python_version = "3.12"

0 commit comments

Comments
 (0)