Skip to content

Commit 7a03ce2

Browse files
committed
Add additional ARGS for pylock locations and names
1 parent fb65049 commit 7a03ce2

File tree

6 files changed

+28
-7
lines changed

6 files changed

+28
-7
lines changed

jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# configuration args #
33
#########################
44
ARG BASE_IMAGE
5+
ARG PYLOCK_PATH
6+
ARG PYLOCK_NAME
57

68
# External image alias for UBI repository configuration
79
FROM registry.access.redhat.com/ubi9/ubi AS ubi-repos
@@ -66,6 +68,8 @@ FROM cpu-base AS jupyter-minimal
6668

6769
ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
6870
ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.12
71+
ARG PYLOCK_PATH
72+
ARG PYLOCK_NAME
6973

7074
LABEL 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

9296
USER 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

96101
# Install Python dependencies from requirements.txt file
97102
RUN /bin/bash <<'EOF'
98103
set -Eeuxo pipefail
99104
echo "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
104109
jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
105110
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ ARG TARGETARCH
44
# configuration args #
55
#########################
66
ARG BASE_IMAGE
7+
ARG PYLOCK_PATH
8+
ARG PYLOCK_NAME
79

810
####################
911
# cuda-base #
@@ -65,6 +67,8 @@ FROM cuda-base AS cuda-jupyter-minimal
6567

6668
ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
6769
ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.12
70+
ARG PYLOCK_PATH
71+
ARG PYLOCK_NAME
6872

6973
LABEL name="odh-notebook-jupyter-cuda-minimal-ubi9-python-3.12" \
7074
summary="Minimal Jupyter CUDA notebook image for ODH notebooks" \
@@ -90,15 +94,16 @@ ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
9094

9195
USER 1001
9296

93-
COPY ${MINIMAL_SOURCE_CODE}/pylock.toml ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
97+
COPY ${MINIMAL_SOURCE_CODE}${PYLOCK_PATH} ./${PYLOCK_NAME}
98+
COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh .
9499

95100
# Install Python dependencies from requirements.txt file
96101
RUN /bin/bash <<'EOF'
97102
set -Eeuxo pipefail
98103
echo "Installing softwares and packages"
99104
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
100105
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
101-
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml
106+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./${PYLOCK_NAME}
102107
# Disable announcement plugin of jupyterlab
103108
jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
104109
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# configuration args #
33
#########################
44
ARG BASE_IMAGE
5+
ARG PYLOCK_PATH
6+
ARG PYLOCK_NAME
57

68
####################
79
# rocm-base #
@@ -63,6 +65,8 @@ FROM rocm-base AS rocm-jupyter-minimal
6365

6466
ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
6567
ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.12
68+
ARG PYLOCK_PATH
69+
ARG PYLOCK_NAME
6670

6771
LABEL name="odh-notebook-jupyter-rocm-minimal-ubi9-python-3.12" \
6872
summary="Minimal Jupyter ROCm notebook image for ODH notebooks" \
@@ -88,15 +92,16 @@ ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
8892

8993
USER 1001
9094

91-
COPY ${MINIMAL_SOURCE_CODE}/pylock.toml ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
95+
COPY ${MINIMAL_SOURCE_CODE}${PYLOCK_PATH} ./${PYLOCK_NAME}
96+
COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh .
9297

93-
# Install Python dependencies from Pipfile.lock file
98+
# Install Python dependencies from pylock file
9499
RUN /bin/bash <<'EOF'
95100
set -Eeuxo pipefail
96101
echo "Installing softwares and packages"
97102
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
98103
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
99-
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml
104+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./${PYLOCK_NAME}
100105
# Disable announcement plugin of jupyterlab
101106
jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
102107
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# Base Image : c9s with Python 3.12
22
BASE_IMAGE=quay.io/opendatahub/odh-base-image-cpu-py312-c9s:latest
3+
PYLOCK_PATH=/pylock.toml
4+
PYLOCK_NAME=pylock.toml
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
BASE_IMAGE=quay.io/opendatahub/odh-base-image-cuda-py312-c9s:v12.8
2+
PYLOCK_PATH=/pylock.toml
3+
PYLOCK_NAME=pylock.toml
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
BASE_IMAGE=quay.io/opendatahub/odh-base-image-rocm-py312-c9s:v6.3
2+
PYLOCK_PATH=/pylock.toml
3+
PYLOCK_NAME=pylock.toml

0 commit comments

Comments
 (0)