22# configuration args #
33#########################
44ARG BASE_IMAGE
5+ ARG PYLOCK_PATH
6+ ARG PYLOCK_NAME
57
68# External image alias for UBI repository configuration
79FROM registry.access.redhat.com/ubi9/ubi AS ubi-repos
@@ -66,6 +68,8 @@ FROM cpu-base AS jupyter-minimal
6668
6769ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
6870ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.12
71+ ARG PYLOCK_PATH
72+ ARG PYLOCK_NAME
6973
7074LABEL name="odh-notebook-jupyter-minimal-ubi9-python-3.12" \
7175 summary="Minimal Jupyter notebook image for ODH notebooks" \
@@ -91,15 +95,16 @@ ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
9195
9296USER 1001
9397
94- COPY ${MINIMAL_SOURCE_CODE}/pylock.toml ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
98+ COPY ${MINIMAL_SOURCE_CODE}${PYLOCK_PATH} ./${PYLOCK_NAME}
99+ COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh .
95100
96- # Install Python dependencies from requirements.txt file
101+ # Install Python dependencies from pylock file
97102RUN /bin/bash <<'EOF'
98103set -Eeuxo pipefail
99104echo "Installing softwares and packages"
100105# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
101106# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
102- uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml
107+ uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./${PYLOCK_NAME}
103108# Disable announcement plugin of jupyterlab
104109jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
105110# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y
0 commit comments