Skip to content

Commit 1899c39

Browse files
committed
Lock rocm and cuda minimal packages from internal aipcc index and set it available on runtime
1 parent a611b07 commit 1899c39

File tree

7 files changed

+1216
-4
lines changed

7 files changed

+1216
-4
lines changed

Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,3 +517,27 @@ test:
517517
@echo "Running quick static tests"
518518
uv run pytest -m 'not buildonlytest'
519519
@./scripts/check_dockerfile_alignment.sh
520+
521+
522+
#This is temporary lock on the final implementation that will covers all the folders should apply smart logic for the locks
523+
CPU_INDEX=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.0/cpu-ubi9/simple/
524+
CUDA_INDEX=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.0/cuda-ubi9/simple/
525+
ROCM_INDEX=https://console.redhat.com/api/pypi/public-rhai/rhoai/3.0/rocm-ubi9/simple/
526+
527+
lock-cuda:
528+
uv pip compile \
529+
--python-platform=linux \
530+
jupyter/minimal/ubi9-python-3.12/pyproject.toml \
531+
--index-url=$(CUDA_INDEX) \
532+
--output-file=jupyter/minimal/ubi9-python-3.12/uv.lock/pylock.cuda.toml \
533+
--python-version=3.12
534+
535+
536+
lock-rocm:
537+
uv pip compile \
538+
--python-platform=linux \
539+
jupyter/minimal/ubi9-python-3.12/pyproject.toml \
540+
--index-url=$(ROCM_INDEX) \
541+
--output-file=jupyter/minimal/ubi9-python-3.12/uv.lock/pylock.rocm.toml \
542+
--python-version=3.12
543+

jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cuda

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,16 @@ ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
7979

8080
USER 1001
8181

82-
COPY ${MINIMAL_SOURCE_CODE}/pylock.toml ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
82+
COPY ${MINIMAL_SOURCE_CODE}/uv.lock/pylock.cuda.toml ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
83+
84+
# Makes available the internal python package index from aipcc on the container runtime
85+
COPY ${MINIMAL_SOURCE_CODE}/cuda-pip.conf /etc/pip.conf
8386

8487
# Install Python dependencies from requirements.txt file
8588
RUN echo "Installing softwares and packages" && \
8689
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
8790
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
88-
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml && \
91+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.cuda.toml && \
8992
# Disable announcement plugin of jupyterlab \
9093
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
9194
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \

jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.rocm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,16 @@ ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
6767

6868
USER 1001
6969

70-
COPY ${MINIMAL_SOURCE_CODE}/pylock.toml ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
70+
COPY ${MINIMAL_SOURCE_CODE}/uv.lock/pylock.rocm.toml ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
71+
72+
# Makes available the internal python package index from aipcc on the container runtime
73+
COPY ${MINIMAL_SOURCE_CODE}/rocm-pip.conf /etc/pip.conf
7174

7275
# Install Python dependencies from Pipfile.lock file
7376
RUN echo "Installing softwares and packages" && \
7477
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
7578
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
76-
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml && \
79+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.rocm.toml && \
7780
# Disable announcement plugin of jupyterlab \
7881
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
7982
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[global]
2+
index-url = https://console.redhat.com/api/pypi/public-rhai/rhoai/3.0/cuda-ubi9/simple/
3+
4+
# Optional fallback (if you *do* want PyPI as backup)
5+
extra-index-url = https://pypi.org/simple/
6+
7+
[install]
8+
trusted-host = console.redhat.com
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[global]
2+
index-url = https://console.redhat.com/api/pypi/public-rhai/rhoai/3.0/cuda-ubi9/simple/
3+
4+
# Optional fallback (if you *do* want PyPI as backup)
5+
extra-index-url = https://pypi.org/simple/
6+
7+
[install]
8+
trusted-host = console.redhat.com

0 commit comments

Comments
 (0)