Skip to content

Commit a612098

Browse files
committed
RHAIENG-304: replace requirements.txt with pylock.toml in all relevant Dockerfiles (#2145)
1 parent c6e8479 commit a612098

File tree

22 files changed

+44
-44
lines changed

22 files changed

+44
-44
lines changed

codeserver/ubi9-python-3.12/Dockerfile.cpu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ ENV PYTHONPATH=/opt/app-root/bin/python3
141141
USER 1001
142142

143143
# Install useful packages from requirements.txt
144-
COPY ${CODESERVER_SOURCE_CODE}/requirements.txt ./
144+
COPY ${CODESERVER_SOURCE_CODE}/pylock.toml ./
145145

146146
# Install packages and cleanup
147147
RUN echo "Installing softwares and packages" && \
148148
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
149149
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
150-
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 && \
150+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml --build-constraints=./pylock.toml && \
151151
# Fix permissions to support pip in Openshift environments \
152152
chmod -R g+w /opt/app-root/lib/python3.12/site-packages && \
153153
fix-permissions /opt/app-root -P

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ ENV PATH="$PATH:/opt/mssql-tools18/bin"
109109
USER 1001
110110

111111
# Install Python packages and Jupyterlab extensions from requirements.txt
112-
COPY ${DATASCIENCE_SOURCE_CODE}/requirements.txt ./
112+
COPY ${DATASCIENCE_SOURCE_CODE}/pylock.toml ./
113113
# Copy Elyra setup to utils so that it's sourced at startup
114114
COPY ${DATASCIENCE_SOURCE_CODE}/setup-elyra.sh ${DATASCIENCE_SOURCE_CODE}/utils ./utils/
115115

116116
RUN echo "Installing softwares and packages" && \
117117
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
118118
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
119-
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 && \
119+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml --build-constraints=./pylock.toml && \
120120
# setup path for runtime configuration
121121
mkdir /opt/app-root/runtimes && \
122122
mkdir /opt/app-root/pipeline-runtimes && \

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

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

6262
USER 1001
6363

64-
COPY ${MINIMAL_SOURCE_CODE}/requirements.txt ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
64+
COPY ${MINIMAL_SOURCE_CODE}/pylock.toml ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
6565

6666
# Install Python dependencies from requirements.txt file
6767
RUN echo "Installing softwares and packages" && \
6868
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
6969
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
70-
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 && \
70+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml --build-constraints=./pylock.toml && \
7171
# Disable announcement plugin of jupyterlab \
7272
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
7373
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \

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

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

161161
USER 1001
162162

163-
COPY ${MINIMAL_SOURCE_CODE}/requirements.txt ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
163+
COPY ${MINIMAL_SOURCE_CODE}/pylock.toml ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
164164

165165
# Install Python dependencies from requirements.txt file
166166
RUN echo "Installing softwares and packages" && \
167167
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
168168
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
169-
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 && \
169+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml --build-constraints=./pylock.toml && \
170170
# Disable announcement plugin of jupyterlab \
171171
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
172172
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \

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

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

9696
USER 1001
9797

98-
COPY ${MINIMAL_SOURCE_CODE}/requirements.txt ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
98+
COPY ${MINIMAL_SOURCE_CODE}/pylock.toml ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
9999

100100
# Install Python dependencies from Pipfile.lock file
101101
RUN echo "Installing softwares and packages" && \
102102
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
103103
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
104-
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 && \
104+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml --build-constraints=./pylock.toml && \
105105
# Disable announcement plugin of jupyterlab \
106106
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
107107
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,12 @@ LABEL name="odh-notebook-jupyter-cuda-pytorch-llmcompressor-ubi9-python-3.12" \
223223
io.openshift.build.image="quay.io/opendatahub/workbench-images:cuda-jupyter-pytorch-llmcompressor-ubi9-python-3.12"
224224

225225
# Install Python packages and Jupyterlab extensions from requirements.txt
226-
COPY ${PYTORCH_SOURCE_CODE}/requirements.txt ./
226+
COPY ${PYTORCH_SOURCE_CODE}/pylock.toml ./
227227

228228
RUN echo "Installing softwares and packages" && \
229229
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
230230
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
231-
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 && \
231+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml --build-constraints=./pylock.toml && \
232232
# setup path for runtime configuration
233233
mkdir /opt/app-root/runtimes && \
234234
# Remove default Elyra runtime-images \

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,12 @@ LABEL name="odh-notebook-jupyter-cuda-pytorch-ubi9-python-3.12" \
223223
io.openshift.build.image="quay.io/opendatahub/workbench-images:cuda-jupyter-pytorch-ubi9-python-3.12"
224224

225225
# Install Python packages and Jupyterlab extensions from requirements.txt
226-
COPY ${PYTORCH_SOURCE_CODE}/requirements.txt ./
226+
COPY ${PYTORCH_SOURCE_CODE}/pylock.toml ./
227227

228228
RUN echo "Installing softwares and packages" && \
229229
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
230230
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
231-
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 && \
231+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml --build-constraints=./pylock.toml && \
232232
# setup path for runtime configuration
233233
mkdir /opt/app-root/runtimes && \
234234
# Remove default Elyra runtime-images \

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ LABEL name="odh-notebook-jupyter-rocm-pytorch-ubi9-python-3.12" \
158158
io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/rocm/pytorch/ubi9-python-3.12" \
159159
io.openshift.build.image="quay.io/opendatahub/workbench-images:rocm-jupyter-pytorch-ubi9-python-3.12"
160160

161-
COPY ${PYTORCH_SOURCE_CODE}/requirements.txt ${PYTORCH_SOURCE_CODE}/de-vendor-torch.sh ./
161+
COPY ${PYTORCH_SOURCE_CODE}/pylock.toml ${PYTORCH_SOURCE_CODE}/de-vendor-torch.sh ./
162162

163163
RUN echo "Installing softwares and packages" && \
164164
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
165165
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
166-
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 && \
166+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml --build-constraints=./pylock.toml && \
167167
# setup path for runtime configuration
168168
mkdir /opt/app-root/runtimes && \
169169
# Remove default Elyra runtime-images \

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@ LABEL name="odh-notebook-jupyter-rocm-tensorflow-ubi9-python-3.12" \
169169
io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/rocm/tensorflow/ubi9-python-3.12" \
170170
io.openshift.build.image="quay.io/opendatahub/workbench-images:rocm-jupyter-tensorflow-ubi9-python-3.12"
171171

172-
COPY ${TENSORFLOW_SOURCE_CODE}/requirements.txt ./
172+
COPY ${TENSORFLOW_SOURCE_CODE}/pylock.toml ./
173173

174174
RUN echo "Installing softwares and packages" && \
175175
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
176176
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
177177
# Not using --build-constraints=./requirements.txt because error: Unnamed requirements are not allowed as constraints (found: `https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4/
178-
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./requirements.txt && \
178+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml && \
179179
# setup path for runtime configuration
180180
mkdir /opt/app-root/runtimes && \
181181
# Remove default Elyra runtime-images \

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,12 @@ LABEL name="odh-notebook-cuda-jupyter-tensorflow-ubi9-python-3.12" \
228228
io.openshift.build.image="quay.io/opendatahub/workbench-images:cuda-jupyter-tensorflow-ubi9-python-3.12"
229229

230230
# Install Python packages and Jupyterlab extensions from requirements.txt
231-
COPY ${TENSORFLOW_SOURCE_CODE}/requirements.txt ./
231+
COPY ${TENSORFLOW_SOURCE_CODE}/pylock.toml ./
232232

233233
RUN echo "Installing softwares and packages" && \
234234
# This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`,
235235
# we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common.
236-
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 && \
236+
uv pip install --strict --no-deps --no-cache --no-config --no-progress --verify-hashes --compile-bytecode --index-strategy=unsafe-best-match --requirements=./pylock.toml --build-constraints=./pylock.toml && \
237237
# setup path for runtime configuration
238238
mkdir /opt/app-root/runtimes && \
239239
# Remove default Elyra runtime-images \

0 commit comments

Comments
 (0)