Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b6e1f01

Browse files
committedMar 24, 2025·
RHOAIENG-21690: chore(Dockerfiles): augument micropipenv with uv for faster package installs
``` × No solution found when resolving dependencies: ╰─▶ Because there is no version of certifi==2025.1.31 and you require certifi==2025.1.31, we can conclude that your requirements are unsatisfiable. hint: `certifi` was found on https://download.pytorch.org/whl/cu121, but not at the requested version (certifi==2025.1.31). A compatible version may be available on a subsequent index (e.g., https://pypi.org/simple). By default, uv will only consider versions that are published on the first index that contains a given package, to avoid dependency confusion attacks. If all indexes are equally trusted, use `--index-strategy unsafe-best-match` to consider all versions from all indexes, regardless of the order in which they were defined. ``` When installing as `USER 1001` in /opt/app-root ``` Using Python 3.11.9 environment at: /opt/app-root error: Permission denied (os error 13) at path "/opt/app-root/.tmpQEqqyQ" ``` believe we should _not_ enable https://docs.astral.sh/uv/reference/settings/#compile-bytecode astral-sh/uv#6493 ``` UV_COMPILE_BYTECODE=1 --compile-bytecode ``` uv has bug installing tensorflow astral-sh/uv#12092
1 parent 2c18a50 commit b6e1f01

File tree

18 files changed

+96
-96
lines changed

18 files changed

+96
-96
lines changed
 

‎codeserver/ubi9-python-3.11/Dockerfile.cpu

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -136,7 +136,7 @@ COPY ${CODESERVER_SOURCE_CODE}/Pipfile.lock ./
136136

137137
# Install packages and cleanup
138138
RUN echo "Installing softwares and packages" && \
139-
micropipenv install && \
139+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
140140
rm -f ./Pipfile.lock && \
141141
# Fix permissions to support pip in Openshift environments \
142142
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \

‎jupyter/datascience/ubi9-python-3.11/Dockerfile.cpu

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -87,19 +87,19 @@ COPY ${DATASCIENCE_SOURCE_CODE}/Pipfile.lock ./
8787
COPY ${DATASCIENCE_SOURCE_CODE}/setup-elyra.sh ${DATASCIENCE_SOURCE_CODE}/utils ./utils/
8888

8989
RUN echo "Installing softwares and packages" && \
90-
micropipenv install && \
90+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
9191
rm -f ./Pipfile.lock && \
9292
# setup path for runtime configuration
9393
mkdir /opt/app-root/runtimes && \
9494
mkdir /opt/app-root/pipeline-runtimes && \
9595
# Remove default Elyra runtime-images \
9696
rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
9797
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
98-
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
98+
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
9999
# Disable announcement plugin of jupyterlab \
100-
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
100+
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
101101
# Apply JupyterLab addons \
102-
/opt/app-root/bin/utils/addons/apply.sh && \
102+
/opt/app-root/bin/utils/addons/apply.sh && \
103103
# Fix permissions to support pip in Openshift environments \
104104
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \
105105
fix-permissions /opt/app-root -P

‎jupyter/minimal/ubi9-python-3.11/Dockerfile.cpu

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -26,7 +26,7 @@ RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/oc
2626
####################
2727
# jupyter-minimal #
2828
####################
29-
FROM base AS jupyter-minimal
29+
FROM base AS jupyter-minimal
3030

3131
ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
3232
ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.11
@@ -49,7 +49,7 @@ COPY ${MINIMAL_SOURCE_CODE}/Pipfile.lock ${MINIMAL_SOURCE_CODE}/start-notebook.s
4949

5050
# Install Python dependencies from Pipfile.lock file
5151
RUN echo "Installing softwares and packages" && \
52-
micropipenv install && \
52+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
5353
rm -f ./Pipfile.lock && \
5454
# Disable announcement plugin of jupyterlab \
5555
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
@@ -60,7 +60,7 @@ RUN echo "Installing softwares and packages" && \
6060
fix-permissions /opt/app-root -P && \
6161
# Apply JupyterLab addons \
6262
/opt/app-root/bin/utils/addons/apply.sh
63-
63+
6464
WORKDIR /opt/app-root/src
6565

66-
ENTRYPOINT ["start-notebook.sh"]
66+
ENTRYPOINT ["start-notebook.sh"]

‎jupyter/minimal/ubi9-python-3.11/Dockerfile.cuda

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -146,7 +146,7 @@ WORKDIR /opt/app-root/src
146146
#########################
147147
# cuda-jupyter-minimal #
148148
#########################
149-
FROM cuda-base AS cuda-jupyter-minimal
149+
FROM cuda-base AS cuda-jupyter-minimal
150150

151151
ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
152152
ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.11
@@ -169,7 +169,7 @@ COPY ${MINIMAL_SOURCE_CODE}/Pipfile.lock ${MINIMAL_SOURCE_CODE}/start-notebook.s
169169

170170
# Install Python dependencies from Pipfile.lock file
171171
RUN echo "Installing softwares and packages" && \
172-
micropipenv install && \
172+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
173173
rm -f ./Pipfile.lock && \
174174
# Disable announcement plugin of jupyterlab \
175175
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
@@ -180,7 +180,7 @@ RUN echo "Installing softwares and packages" && \
180180
fix-permissions /opt/app-root -P && \
181181
# Apply JupyterLab addons \
182182
/opt/app-root/bin/utils/addons/apply.sh
183-
183+
184184
WORKDIR /opt/app-root/src
185185

186-
ENTRYPOINT ["start-notebook.sh"]
186+
ENTRYPOINT ["start-notebook.sh"]

‎jupyter/minimal/ubi9-python-3.11/Dockerfile.rocm

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -60,7 +60,7 @@ WORKDIR /opt/app-root/src
6060
########################
6161
# rocm-jupyter-minimal #
6262
########################
63-
FROM rocm-base AS rocm-jupyter-minimal
63+
FROM rocm-base AS rocm-jupyter-minimal
6464

6565
ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
6666
ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.11
@@ -83,7 +83,7 @@ COPY ${MINIMAL_SOURCE_CODE}/Pipfile.lock ${MINIMAL_SOURCE_CODE}/start-notebook.s
8383

8484
# Install Python dependencies from Pipfile.lock file
8585
RUN echo "Installing softwares and packages" && \
86-
micropipenv install && \
86+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
8787
rm -f ./Pipfile.lock && \
8888
# Disable announcement plugin of jupyterlab \
8989
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
@@ -94,7 +94,7 @@ RUN echo "Installing softwares and packages" && \
9494
fix-permissions /opt/app-root -P && \
9595
# Apply JupyterLab addons \
9696
/opt/app-root/bin/utils/addons/apply.sh
97-
97+
9898
WORKDIR /opt/app-root/src
9999

100-
ENTRYPOINT ["start-notebook.sh"]
100+
ENTRYPOINT ["start-notebook.sh"]

‎jupyter/pytorch/ubi9-python-3.11/Dockerfile.cuda

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -146,7 +146,7 @@ WORKDIR /opt/app-root/src
146146
#########################
147147
# cuda-jupyter-minimal #
148148
#########################
149-
FROM cuda-base AS cuda-jupyter-minimal
149+
FROM cuda-base AS cuda-jupyter-minimal
150150

151151
ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
152152
ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.11
@@ -156,7 +156,7 @@ WORKDIR /opt/app-root/bin
156156
COPY ${JUPYTER_REUSABLE_UTILS} utils/
157157

158158
COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
159-
159+
160160
WORKDIR /opt/app-root/src
161161

162162
ENTRYPOINT ["start-notebook.sh"]
@@ -220,18 +220,18 @@ LABEL name="odh-notebook-jupyter-cuda-pytorch-ubi9-python-3.11" \
220220
COPY ${PYTORCH_SOURCE_CODE}/Pipfile.lock ./
221221

222222
RUN echo "Installing softwares and packages" && \
223-
micropipenv install && \
223+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
224224
rm -f ./Pipfile.lock && \
225225
# setup path for runtime configuration
226226
mkdir /opt/app-root/runtimes && \
227227
# Remove default Elyra runtime-images \
228228
rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
229229
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
230-
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
230+
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
231231
# Disable announcement plugin of jupyterlab \
232-
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
232+
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
233233
# Apply JupyterLab addons \
234-
/opt/app-root/bin/utils/addons/apply.sh && \
234+
/opt/app-root/bin/utils/addons/apply.sh && \
235235
# Fix permissions to support pip in Openshift environments \
236236
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \
237237
fix-permissions /opt/app-root -P

‎jupyter/rocm/pytorch/ubi9-python-3.11/Dockerfile.rocm

+12-12
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -60,7 +60,7 @@ WORKDIR /opt/app-root/src
6060
########################
6161
# rocm-jupyter-minimal #
6262
########################
63-
FROM rocm-base AS rocm-jupyter-minimal
63+
FROM rocm-base AS rocm-jupyter-minimal
6464

6565
ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
6666
ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.11
@@ -70,15 +70,15 @@ WORKDIR /opt/app-root/bin
7070
COPY ${JUPYTER_REUSABLE_UTILS} utils/
7171

7272
COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
73-
73+
7474
WORKDIR /opt/app-root/src
7575

7676
ENTRYPOINT ["start-notebook.sh"]
7777

7878
############################
7979
# rocm-jupyter-datascience #
8080
############################
81-
FROM rocm-jupyter-minimal AS rocm-jupyter-datascience
81+
FROM rocm-jupyter-minimal AS rocm-jupyter-datascience
8282

8383
ARG DATASCIENCE_SOURCE_CODE=jupyter/datascience/ubi9-python-3.11
8484

@@ -114,7 +114,7 @@ WORKDIR /opt/app-root/src
114114
########################
115115
# rocm-jupyter-pytorch #
116116
########################
117-
FROM rocm-jupyter-datascience AS rocm-jupyter-pytorch
117+
FROM rocm-jupyter-datascience AS rocm-jupyter-pytorch
118118

119119
ARG DATASCIENCE_SOURCE_CODE=jupyter/datascience/ubi9-python-3.11
120120
ARG PYTORCH_SOURCE_CODE=jupyter/rocm/pytorch/ubi9-python-3.11
@@ -134,21 +134,21 @@ LABEL name="odh-notebook-jupyter-rocm-pytorch-ubi9-python-3.11" \
134134
COPY ${PYTORCH_SOURCE_CODE}/Pipfile.lock ${PYTORCH_SOURCE_CODE}/de-vendor-torch.sh ./
135135

136136
RUN echo "Installing softwares and packages" && \
137-
micropipenv install && \
138-
rm -f ./Pipfile.lock && \
137+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
138+
rm -f ./Pipfile.lock && \
139139
# setup path for runtime configuration
140140
mkdir /opt/app-root/runtimes && \
141141
# Remove default Elyra runtime-images \
142-
rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
142+
rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
143143
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
144144
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
145145
# Disable announcement plugin of jupyterlab \
146146
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
147147
# Apply JupyterLab addons \
148-
/opt/app-root/bin/utils/addons/apply.sh && \
148+
/opt/app-root/bin/utils/addons/apply.sh && \
149149
# De-vendor the ROCm libs that are embedded in Pytorch \
150150
./de-vendor-torch.sh && \
151-
rm ./de-vendor-torch.sh && \
151+
rm ./de-vendor-torch.sh && \
152152
# Fix permissions to support pip in Openshift environments \
153153
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \
154154
fix-permissions /opt/app-root -P
@@ -157,4 +157,4 @@ RUN echo "Installing softwares and packages" && \
157157
# Copy Elyra runtime-images definitions and set the version
158158
COPY ${DATASCIENCE_SOURCE_CODE}/runtime-images/ /opt/app-root/share/jupyter/metadata/runtime-images/
159159

160-
WORKDIR /opt/app-root/src
160+
WORKDIR /opt/app-root/src

‎jupyter/rocm/tensorflow/ubi9-python-3.11/Dockerfile.rocm

+10-10
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -60,7 +60,7 @@ WORKDIR /opt/app-root/src
6060
########################
6161
# rocm-jupyter-minimal #
6262
########################
63-
FROM rocm-base AS rocm-jupyter-minimal
63+
FROM rocm-base AS rocm-jupyter-minimal
6464

6565
ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
6666
ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.11
@@ -70,15 +70,15 @@ WORKDIR /opt/app-root/bin
7070
COPY ${JUPYTER_REUSABLE_UTILS} utils/
7171

7272
COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
73-
73+
7474
WORKDIR /opt/app-root/src
7575

7676
ENTRYPOINT ["start-notebook.sh"]
7777

7878
############################
7979
# rocm-jupyter-datascience #
8080
############################
81-
FROM rocm-jupyter-minimal AS rocm-jupyter-datascience
81+
FROM rocm-jupyter-minimal AS rocm-jupyter-datascience
8282

8383
ARG DATASCIENCE_SOURCE_CODE=jupyter/datascience/ubi9-python-3.11
8484

@@ -114,7 +114,7 @@ WORKDIR /opt/app-root/src
114114
###########################
115115
# rocm-jupyter-tensorflow #
116116
###########################
117-
FROM rocm-jupyter-datascience AS rocm-jupyter-tensorflow
117+
FROM rocm-jupyter-datascience AS rocm-jupyter-tensorflow
118118

119119
ARG DATASCIENCE_SOURCE_CODE=jupyter/datascience/ubi9-python-3.11
120120
ARG TENSORFLOW_SOURCE_CODE=jupyter/rocm/tensorflow/ubi9-python-3.11
@@ -134,18 +134,18 @@ LABEL name="odh-notebook-jupyter-rocm-tensorflow-ubi9-python-3.11" \
134134
COPY ${TENSORFLOW_SOURCE_CODE}/Pipfile.lock ./
135135

136136
RUN echo "Installing softwares and packages" && \
137-
micropipenv install --dev && \
138-
rm -f ./Pipfile.lock && \
137+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
138+
rm -f ./Pipfile.lock && \
139139
# setup path for runtime configuration
140140
mkdir /opt/app-root/runtimes && \
141141
# Remove default Elyra runtime-images \
142-
rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
142+
rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
143143
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
144144
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
145145
# Disable announcement plugin of jupyterlab \
146146
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
147147
# Apply JupyterLab addons \
148-
/opt/app-root/bin/utils/addons/apply.sh && \
148+
/opt/app-root/bin/utils/addons/apply.sh && \
149149
# Fix permissions to support pip in Openshift environments \
150150
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \
151151
fix-permissions /opt/app-root -P

‎jupyter/tensorflow/ubi9-python-3.11/Dockerfile.cuda

+7-7
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -146,7 +146,7 @@ WORKDIR /opt/app-root/src
146146
#########################
147147
# cuda-jupyter-minimal #
148148
#########################
149-
FROM cuda-base AS cuda-jupyter-minimal
149+
FROM cuda-base AS cuda-jupyter-minimal
150150

151151
ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
152152
ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.11
@@ -156,7 +156,7 @@ WORKDIR /opt/app-root/bin
156156
COPY ${JUPYTER_REUSABLE_UTILS} utils/
157157

158158
COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
159-
159+
160160
WORKDIR /opt/app-root/src
161161

162162
ENTRYPOINT ["start-notebook.sh"]
@@ -220,16 +220,16 @@ LABEL name="odh-notebook-cuda-jupyter-tensorflow-ubi9-python-3.11" \
220220
COPY ${TENSORFLOW_SOURCE_CODE}/Pipfile.lock ./
221221

222222
RUN echo "Installing softwares and packages" && \
223-
micropipenv install --dev && \
223+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
224224
rm -f ./Pipfile.lock && \
225225
# setup path for runtime configuration
226226
mkdir /opt/app-root/runtimes && \
227227
# Remove default Elyra runtime-images \
228228
rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
229229
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
230-
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
230+
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
231231
# Disable announcement plugin of jupyterlab \
232-
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
232+
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
233233
# Apply JupyterLab addons \
234234
/opt/app-root/bin/utils/addons/apply.sh && \
235235
# Fix permissions to support pip in Openshift environments \

‎jupyter/trustyai/ubi9-python-3.11/Dockerfile.cpu

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -107,18 +107,18 @@ USER 1001
107107
COPY ${TRUSTYAI_SOURCE_CODE}/Pipfile.lock ./
108108

109109
RUN echo "Installing softwares and packages" && \
110-
micropipenv install && \
110+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
111111
rm -f ./Pipfile.lock && \
112112
# setup path for runtime configuration
113113
mkdir /opt/app-root/runtimes && \
114114
# Remove default Elyra runtime-images \
115115
rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
116116
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
117-
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
117+
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
118118
# Disable announcement plugin of jupyterlab \
119-
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
119+
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
120120
# Apply JupyterLab addons \
121-
/opt/app-root/bin/utils/addons/apply.sh && \
121+
/opt/app-root/bin/utils/addons/apply.sh && \
122122
# Fix permissions to support pip in Openshift environments \
123123
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \
124124
fix-permissions /opt/app-root -P

‎rstudio/c9s-python-3.11/Dockerfile.cpu

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ FROM quay.io/sclorg/python-311-c9s:c9s AS base
55

66
WORKDIR /opt/app-root/bin
77

8-
# Install micropipenv to deploy packages from Pipfile.lock
9-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
8+
# Install micropipenv and uv to deploy packages from Pipfile.lock
9+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1010

1111
# OS Packages needs to be installed as root
1212
USER root
@@ -161,7 +161,7 @@ USER 1001
161161
COPY ${RSTUDIO_SOURCE_CODE}/Pipfile.lock ./
162162

163163
RUN echo "Installing softwares and packages" && \
164-
micropipenv install && \
164+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
165165
rm -f ./Pipfile.lock && \
166166
# Fix permissions to support pip in Openshift environments \
167167
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \

‎rstudio/c9s-python-3.11/Dockerfile.cuda

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ FROM quay.io/sclorg/python-311-c9s:c9s AS base
55

66
WORKDIR /opt/app-root/bin
77

8-
# Install micropipenv to deploy packages from Pipfile.lock
9-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
8+
# Install micropipenv and uv to deploy packages from Pipfile.lock
9+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1010

1111
# OS Packages needs to be installed as root
1212
USER root
@@ -285,7 +285,7 @@ USER 1001
285285
COPY ${RSTUDIO_SOURCE_CODE}/Pipfile.lock ./
286286

287287
RUN echo "Installing softwares and packages" && \
288-
micropipenv install && \
288+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
289289
rm -f ./Pipfile.lock && \
290290
# Fix permissions to support pip in Openshift environments \
291291
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \

‎runtimes/datascience/ubi9-python-3.11/Dockerfile.cpu

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -26,7 +26,7 @@ RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/oc
2626
#######################
2727
# runtime-datascience #
2828
#######################
29-
FROM base AS runtime-datascience
29+
FROM base AS runtime-datascience
3030

3131
ARG DATASCIENCE_SOURCE_CODE=runtimes/datascience/ubi9-python-3.11
3232

@@ -48,7 +48,7 @@ COPY ${DATASCIENCE_SOURCE_CODE}/Pipfile.lock ./
4848
COPY ${DATASCIENCE_SOURCE_CODE}/utils ./utils/
4949

5050
RUN echo "Installing softwares and packages" && \
51-
micropipenv install && \
51+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
5252
rm -f ./Pipfile.lock && \
5353
# Fix permissions to support pip in Openshift environments \
5454
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \

‎runtimes/minimal/ubi9-python-3.11/Dockerfile.cpu

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -26,7 +26,7 @@ RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/oc
2626
####################
2727
# runtime-minimal #
2828
####################
29-
FROM base AS runtime-minimal
29+
FROM base AS runtime-minimal
3030

3131
ARG MINIMAL_SOURCE_CODE=runtimes/minimal/ubi9-python-3.11
3232

@@ -48,7 +48,7 @@ COPY ${MINIMAL_SOURCE_CODE}/Pipfile.lock ./
4848
COPY ${MINIMAL_SOURCE_CODE}/utils ./utils/
4949

5050
RUN echo "Installing softwares and packages" && \
51-
micropipenv install && \
51+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
5252
rm -f ./Pipfile.lock && \
5353
# Fix permissions to support pip in Openshift environments \
5454
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \

‎runtimes/pytorch/ubi9-python-3.11/Dockerfile.cuda

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -168,7 +168,7 @@ COPY ${PYTORCH_SOURCE_CODE}/Pipfile.lock ./
168168
COPY ${PYTORCH_SOURCE_CODE}/utils ./utils/
169169

170170
RUN echo "Installing softwares and packages" && \
171-
micropipenv install && \
171+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
172172
rm -f ./Pipfile.lock && \
173173
# Fix permissions to support pip in Openshift environments \
174174
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \

‎runtimes/rocm-pytorch/ubi9-python-3.11/Dockerfile.rocm

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -84,7 +84,7 @@ COPY ${PYTORCH_SOURCE_CODE}/utils ./utils/
8484
COPY ${PYTORCH_SOURCE_CODE}/de-vendor-torch.sh ./
8585

8686
RUN echo "Installing softwares and packages" && \
87-
micropipenv install && \
87+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
8888
rm -f ./Pipfile.lock && \
8989
# De-vendor the ROCm libs that are embedded in Pytorch \
9090
./de-vendor-torch.sh && \

‎runtimes/rocm-tensorflow/ubi9-python-3.11/Dockerfile.rocm

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -82,7 +82,7 @@ COPY ${TENSORFLOW_SOURCE_CODE}/Pipfile.lock ./
8282
COPY ${TENSORFLOW_SOURCE_CODE}/utils ./utils/
8383

8484
RUN echo "Installing softwares and packages" && \
85-
micropipenv install && \
85+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
8686
rm -f ./Pipfile.lock && \
8787
# Fix permissions to support pip in Openshift environments \
8888
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \

‎runtimes/tensorflow/ubi9-python-3.11/Dockerfile.cuda

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1414
# Other apps and tools installed as default user
1515
USER 1001
1616

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
17+
# Install micropipenv and uv to deploy packages from Pipfile.lock
18+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
1919

2020
# Install the oc client
2121
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
@@ -168,7 +168,7 @@ COPY ${TENSORFLOW_SOURCE_CODE}/Pipfile.lock ./
168168
COPY ${TENSORFLOW_SOURCE_CODE}/utils ./utils/
169169

170170
RUN echo "Installing softwares and packages" && \
171-
micropipenv install && \
171+
micropipenv requirements | uv pip install --strict --no-deps --no-cache --no-config --no-progress --require-hashes --index-strategy unsafe-best-match --requirements - && \
172172
rm -f ./Pipfile.lock && \
173173
# Fix permissions to support pip in Openshift environments \
174174
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \

0 commit comments

Comments
 (0)
Please sign in to comment.