diff --git a/codeserver/ubi9-python-3.11/Dockerfile.cpu b/codeserver/ubi9-python-3.11/Dockerfile.cpu index 4abd64fccb..4166d991ec 100644 --- a/codeserver/ubi9-python-3.11/Dockerfile.cpu +++ b/codeserver/ubi9-python-3.11/Dockerfile.cpu @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -134,13 +134,14 @@ ENV PYTHONPATH=/opt/app-root/bin/python3 USER 1001 -# Install useful packages from Pipfile.lock -COPY ${CODESERVER_SOURCE_CODE}/Pipfile.lock ./ +# Install useful packages from requirements.txt +COPY ${CODESERVER_SOURCE_CODE}/requirements.txt ./ # Install packages and cleanup RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \ fix-permissions /opt/app-root -P diff --git a/codeserver/ubi9-python-3.12/Dockerfile.cpu b/codeserver/ubi9-python-3.12/Dockerfile.cpu index 9f6033ef24..e40e253954 100644 --- a/codeserver/ubi9-python-3.12/Dockerfile.cpu +++ b/codeserver/ubi9-python-3.12/Dockerfile.cpu @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -134,13 +134,14 @@ ENV PYTHONPATH=/opt/app-root/bin/python3 USER 1001 -# Install useful packages from Pipfile.lock -COPY ${CODESERVER_SOURCE_CODE}/Pipfile.lock ./ +# Install useful packages from requirements.txt +COPY ${CODESERVER_SOURCE_CODE}/requirements.txt ./ # Install packages and cleanup RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.12/site-packages && \ fix-permissions /opt/app-root -P diff --git a/jupyter/datascience/ubi9-python-3.11/Dockerfile.cpu b/jupyter/datascience/ubi9-python-3.11/Dockerfile.cpu index c166492ad7..184c264a40 100644 --- a/jupyter/datascience/ubi9-python-3.11/Dockerfile.cpu +++ b/jupyter/datascience/ubi9-python-3.11/Dockerfile.cpu @@ -27,8 +27,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -101,14 +101,15 @@ ENV PATH="$PATH:/opt/mssql-tools18/bin" # Other apps and tools installed as default user USER 1001 -# Install Python packages and Jupyterlab extensions from Pipfile.lock -COPY ${DATASCIENCE_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages and Jupyterlab extensions from requirements.txt +COPY ${DATASCIENCE_SOURCE_CODE}/requirements.txt ./ # Copy Elyra setup to utils so that it's sourced at startup COPY ${DATASCIENCE_SOURCE_CODE}/setup-elyra.sh ${DATASCIENCE_SOURCE_CODE}/utils ./utils/ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # setup path for runtime configuration mkdir /opt/app-root/runtimes && \ mkdir /opt/app-root/pipeline-runtimes && \ diff --git a/jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu b/jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu index ac0cc218d9..b964e91b31 100644 --- a/jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu +++ b/jupyter/datascience/ubi9-python-3.12/Dockerfile.cpu @@ -27,8 +27,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -101,14 +101,15 @@ ENV PATH="$PATH:/opt/mssql-tools18/bin" # Other apps and tools installed as default user USER 1001 -# Install Python packages and Jupyterlab extensions from Pipfile.lock -COPY ${DATASCIENCE_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages and Jupyterlab extensions from requirements.txt +COPY ${DATASCIENCE_SOURCE_CODE}/requirements.txt ./ # Copy Elyra setup to utils so that it's sourced at startup COPY ${DATASCIENCE_SOURCE_CODE}/setup-elyra.sh ${DATASCIENCE_SOURCE_CODE}/utils ./utils/ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # setup path for runtime configuration mkdir /opt/app-root/runtimes && \ mkdir /opt/app-root/pipeline-runtimes && \ diff --git a/jupyter/minimal/ubi9-python-3.11/Dockerfile.cpu b/jupyter/minimal/ubi9-python-3.11/Dockerfile.cpu index cb62cfef16..2dd083f656 100644 --- a/jupyter/minimal/ubi9-python-3.11/Dockerfile.cpu +++ b/jupyter/minimal/ubi9-python-3.11/Dockerfile.cpu @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -54,12 +54,13 @@ ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH" USER 1001 -COPY ${MINIMAL_SOURCE_CODE}/Pipfile.lock ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ +COPY ${MINIMAL_SOURCE_CODE}/requirements.txt ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ -# Install Python dependencies from Pipfile.lock file +# Install Python dependencies from requirements.txt file RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Disable announcement plugin of jupyterlab \ jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \ # Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \ diff --git a/jupyter/minimal/ubi9-python-3.11/Dockerfile.cuda b/jupyter/minimal/ubi9-python-3.11/Dockerfile.cuda index 10b99f358e..9014e4e08f 100644 --- a/jupyter/minimal/ubi9-python-3.11/Dockerfile.cuda +++ b/jupyter/minimal/ubi9-python-3.11/Dockerfile.cuda @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -182,12 +182,13 @@ ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH" USER 1001 -COPY ${MINIMAL_SOURCE_CODE}/Pipfile.lock ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ +COPY ${MINIMAL_SOURCE_CODE}/requirements.txt ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ -# Install Python dependencies from Pipfile.lock file +# Install Python dependencies from requirements.txt file RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Disable announcement plugin of jupyterlab \ jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \ # Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \ diff --git a/jupyter/minimal/ubi9-python-3.11/Dockerfile.rocm b/jupyter/minimal/ubi9-python-3.11/Dockerfile.rocm index 7d48a5e6e9..2de2e05b2b 100644 --- a/jupyter/minimal/ubi9-python-3.11/Dockerfile.rocm +++ b/jupyter/minimal/ubi9-python-3.11/Dockerfile.rocm @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -88,12 +88,13 @@ ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH" USER 1001 -COPY ${MINIMAL_SOURCE_CODE}/Pipfile.lock ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ +COPY ${MINIMAL_SOURCE_CODE}/requirements.txt ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ -# Install Python dependencies from Pipfile.lock file +# Install Python dependencies from requirements.txt file RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Disable announcement plugin of jupyterlab \ jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \ # Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \ diff --git a/jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu b/jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu index 2545979530..b175d1a933 100644 --- a/jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu +++ b/jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -54,12 +54,13 @@ ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH" USER 1001 -COPY ${MINIMAL_SOURCE_CODE}/Pipfile.lock ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ +COPY ${MINIMAL_SOURCE_CODE}/requirements.txt ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ -# Install Python dependencies from Pipfile.lock file +# Install Python dependencies from requirements.txt file RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Disable announcement plugin of jupyterlab \ jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \ # Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \ diff --git a/jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda b/jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda index 3ba67f77a4..e59b105978 100644 --- a/jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda +++ b/jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -156,12 +156,13 @@ ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH" USER 1001 -COPY ${MINIMAL_SOURCE_CODE}/Pipfile.lock ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ +COPY ${MINIMAL_SOURCE_CODE}/requirements.txt ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ -# Install Python dependencies from Pipfile.lock file +# Install Python dependencies from requirements.txt file RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Disable announcement plugin of jupyterlab \ jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \ # Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \ diff --git a/jupyter/minimal/ubi9-python-3.12/Dockerfile.rocm b/jupyter/minimal/ubi9-python-3.12/Dockerfile.rocm index afe9985f5f..0bd79f6b04 100644 --- a/jupyter/minimal/ubi9-python-3.12/Dockerfile.rocm +++ b/jupyter/minimal/ubi9-python-3.12/Dockerfile.rocm @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -88,12 +88,13 @@ ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH" USER 1001 -COPY ${MINIMAL_SOURCE_CODE}/Pipfile.lock ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ +COPY ${MINIMAL_SOURCE_CODE}/requirements.txt ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ # Install Python dependencies from Pipfile.lock file RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Disable announcement plugin of jupyterlab \ jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \ # Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \ diff --git a/jupyter/pytorch/ubi9-python-3.11/Dockerfile.cuda b/jupyter/pytorch/ubi9-python-3.11/Dockerfile.cuda index 045f637d64..205cb26f7e 100644 --- a/jupyter/pytorch/ubi9-python-3.11/Dockerfile.cuda +++ b/jupyter/pytorch/ubi9-python-3.11/Dockerfile.cuda @@ -27,8 +27,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -178,7 +178,6 @@ WORKDIR /opt/app-root/bin COPY ${JUPYTER_REUSABLE_UTILS} utils/ COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ - USER 0 # Dependencies for PDF export @@ -244,12 +243,13 @@ LABEL name="odh-notebook-jupyter-cuda-pytorch-ubi9-python-3.11" \ io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/pytorch/ubi9-python-3.11" \ io.openshift.build.image="quay.io/opendatahub/workbench-images:cuda-jupyter-pytorch-ubi9-python-3.11" -# Install Python packages and Jupyterlab extensions from Pipfile.lock -COPY ${PYTORCH_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages and Jupyterlab extensions from requirements.txt +COPY ${PYTORCH_SOURCE_CODE}/requirements.txt ./ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # setup path for runtime configuration mkdir /opt/app-root/runtimes && \ # Remove default Elyra runtime-images \ diff --git a/jupyter/pytorch/ubi9-python-3.12/Dockerfile.cuda b/jupyter/pytorch/ubi9-python-3.12/Dockerfile.cuda index 1b8e1ce951..8049281b73 100644 --- a/jupyter/pytorch/ubi9-python-3.12/Dockerfile.cuda +++ b/jupyter/pytorch/ubi9-python-3.12/Dockerfile.cuda @@ -27,8 +27,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -218,12 +218,13 @@ LABEL name="odh-notebook-jupyter-cuda-pytorch-ubi9-python-3.12" \ io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/pytorch/ubi9-python-3.12" \ io.openshift.build.image="quay.io/opendatahub/workbench-images:cuda-jupyter-pytorch-ubi9-python-3.12" -# Install Python packages and Jupyterlab extensions from Pipfile.lock -COPY ${PYTORCH_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages and Jupyterlab extensions from requirements.txt +COPY ${PYTORCH_SOURCE_CODE}/requirements.txt ./ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # setup path for runtime configuration mkdir /opt/app-root/runtimes && \ # Remove default Elyra runtime-images \ diff --git a/jupyter/rocm/pytorch/ubi9-python-3.11/Dockerfile.rocm b/jupyter/rocm/pytorch/ubi9-python-3.11/Dockerfile.rocm index 7fb7f1c678..282a4b11fc 100644 --- a/jupyter/rocm/pytorch/ubi9-python-3.11/Dockerfile.rocm +++ b/jupyter/rocm/pytorch/ubi9-python-3.11/Dockerfile.rocm @@ -27,8 +27,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -84,7 +84,6 @@ WORKDIR /opt/app-root/bin COPY ${JUPYTER_REUSABLE_UTILS} utils/ COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ - USER 0 # Dependencies for PDF export @@ -92,7 +91,6 @@ RUN ./utils/install_pdf_deps.sh ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH" USER 1001 - WORKDIR /opt/app-root/src ENTRYPOINT ["start-notebook.sh"] @@ -151,11 +149,12 @@ LABEL name="odh-notebook-jupyter-rocm-pytorch-ubi9-python-3.11" \ io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/rocm/pytorch/ubi9-python-3.11" \ io.openshift.build.image="quay.io/opendatahub/workbench-images:rocm-jupyter-pytorch-ubi9-python-3.11" -COPY ${PYTORCH_SOURCE_CODE}/Pipfile.lock ${PYTORCH_SOURCE_CODE}/de-vendor-torch.sh ./ +COPY ${PYTORCH_SOURCE_CODE}/requirements.txt ${PYTORCH_SOURCE_CODE}/de-vendor-torch.sh ./ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # setup path for runtime configuration mkdir /opt/app-root/runtimes && \ # Remove default Elyra runtime-images \ diff --git a/jupyter/rocm/pytorch/ubi9-python-3.12/Dockerfile.rocm b/jupyter/rocm/pytorch/ubi9-python-3.12/Dockerfile.rocm index fc17d732b9..8fa879c800 100644 --- a/jupyter/rocm/pytorch/ubi9-python-3.12/Dockerfile.rocm +++ b/jupyter/rocm/pytorch/ubi9-python-3.12/Dockerfile.rocm @@ -27,8 +27,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -151,11 +151,12 @@ LABEL name="odh-notebook-jupyter-rocm-pytorch-ubi9-python-3.12" \ io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/rocm/pytorch/ubi9-python-3.12" \ io.openshift.build.image="quay.io/opendatahub/workbench-images:rocm-jupyter-pytorch-ubi9-python-3.12" -COPY ${PYTORCH_SOURCE_CODE}/Pipfile.lock ${PYTORCH_SOURCE_CODE}/de-vendor-torch.sh ./ +COPY ${PYTORCH_SOURCE_CODE}/requirements.txt ${PYTORCH_SOURCE_CODE}/de-vendor-torch.sh ./ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # setup path for runtime configuration mkdir /opt/app-root/runtimes && \ # Remove default Elyra runtime-images \ diff --git a/jupyter/rocm/tensorflow/ubi9-python-3.11/Dockerfile.rocm b/jupyter/rocm/tensorflow/ubi9-python-3.11/Dockerfile.rocm index 200376ac73..cf1b038f01 100644 --- a/jupyter/rocm/tensorflow/ubi9-python-3.11/Dockerfile.rocm +++ b/jupyter/rocm/tensorflow/ubi9-python-3.11/Dockerfile.rocm @@ -27,8 +27,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -151,11 +151,12 @@ LABEL name="odh-notebook-jupyter-rocm-tensorflow-ubi9-python-3.11" \ io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/rocm/tensorflow/ubi9-python-3.11" \ io.openshift.build.image="quay.io/opendatahub/workbench-images:rocm-jupyter-tensorflow-ubi9-python-3.11" -COPY ${TENSORFLOW_SOURCE_CODE}/Pipfile.lock ./ +COPY ${TENSORFLOW_SOURCE_CODE}/requirements.txt ./ RUN echo "Installing softwares and packages" && \ - micropipenv install --dev && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # setup path for runtime configuration mkdir /opt/app-root/runtimes && \ # Remove default Elyra runtime-images \ diff --git a/jupyter/tensorflow/ubi9-python-3.11/Dockerfile.cuda b/jupyter/tensorflow/ubi9-python-3.11/Dockerfile.cuda index 8885d16ed5..7e3ce3e77e 100644 --- a/jupyter/tensorflow/ubi9-python-3.11/Dockerfile.cuda +++ b/jupyter/tensorflow/ubi9-python-3.11/Dockerfile.cuda @@ -27,8 +27,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -178,7 +178,6 @@ WORKDIR /opt/app-root/bin COPY ${JUPYTER_REUSABLE_UTILS} utils/ COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./ - USER 0 # Dependencies for PDF export @@ -244,12 +243,13 @@ LABEL name="odh-notebook-cuda-jupyter-tensorflow-ubi9-python-3.11" \ io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/tensorflow/ubi9-python-3.11" \ io.openshift.build.image="quay.io/opendatahub/workbench-images:cuda-jupyter-tensorflow-ubi9-python-3.11" -# Install Python packages and Jupyterlab extensions from Pipfile.lock -COPY ${TENSORFLOW_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages and Jupyterlab extensions from requirements.txt +COPY ${TENSORFLOW_SOURCE_CODE}/requirements.txt ./ RUN echo "Installing softwares and packages" && \ - micropipenv install --dev && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # setup path for runtime configuration mkdir /opt/app-root/runtimes && \ # Remove default Elyra runtime-images \ diff --git a/jupyter/tensorflow/ubi9-python-3.12/Dockerfile.cuda b/jupyter/tensorflow/ubi9-python-3.12/Dockerfile.cuda index 67496a64d1..596bcd4a9c 100644 --- a/jupyter/tensorflow/ubi9-python-3.12/Dockerfile.cuda +++ b/jupyter/tensorflow/ubi9-python-3.12/Dockerfile.cuda @@ -27,8 +27,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -223,12 +223,13 @@ LABEL name="odh-notebook-cuda-jupyter-tensorflow-ubi9-python-3.12" \ io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/tensorflow/ubi9-python-3.12" \ io.openshift.build.image="quay.io/opendatahub/workbench-images:cuda-jupyter-tensorflow-ubi9-python-3.12" -# Install Python packages and Jupyterlab extensions from Pipfile.lock -COPY ${TENSORFLOW_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages and Jupyterlab extensions from requirements.txt +COPY ${TENSORFLOW_SOURCE_CODE}/requirements.txt ./ RUN echo "Installing softwares and packages" && \ - micropipenv install --dev && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # setup path for runtime configuration mkdir /opt/app-root/runtimes && \ # Remove default Elyra runtime-images \ diff --git a/jupyter/trustyai/ubi9-python-3.11/Dockerfile.cpu b/jupyter/trustyai/ubi9-python-3.11/Dockerfile.cpu index 8111d72b26..504b9e714a 100644 --- a/jupyter/trustyai/ubi9-python-3.11/Dockerfile.cpu +++ b/jupyter/trustyai/ubi9-python-3.11/Dockerfile.cpu @@ -27,8 +27,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -123,12 +123,13 @@ RUN INSTALL_PKGS="java-17-openjdk" && \ USER 1001 -# Install Python packages and Jupyterlab extensions from Pipfile.lock -COPY ${TRUSTYAI_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages and Jupyterlab extensions from requirements.txt +COPY ${TRUSTYAI_SOURCE_CODE}/requirements.txt ./ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # setup path for runtime configuration mkdir /opt/app-root/runtimes && \ # Remove default Elyra runtime-images \ diff --git a/jupyter/trustyai/ubi9-python-3.12/Dockerfile.cpu b/jupyter/trustyai/ubi9-python-3.12/Dockerfile.cpu index 1718331119..0a396af541 100644 --- a/jupyter/trustyai/ubi9-python-3.12/Dockerfile.cpu +++ b/jupyter/trustyai/ubi9-python-3.12/Dockerfile.cpu @@ -27,8 +27,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -123,12 +123,13 @@ RUN INSTALL_PKGS="java-17-openjdk" && \ USER 1001 -# Install Python packages and Jupyterlab extensions from Pipfile.lock -COPY ${TRUSTYAI_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages and Jupyterlab extensions from requirements.txt +COPY ${TRUSTYAI_SOURCE_CODE}/requirements.txt ./ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # setup path for runtime configuration mkdir /opt/app-root/runtimes && \ # Remove default Elyra runtime-images \ diff --git a/rstudio/c9s-python-3.11/Dockerfile.cpu b/rstudio/c9s-python-3.11/Dockerfile.cpu index 1b65dfb0b7..bb78089e16 100644 --- a/rstudio/c9s-python-3.11/Dockerfile.cpu +++ b/rstudio/c9s-python-3.11/Dockerfile.cpu @@ -5,8 +5,8 @@ FROM quay.io/sclorg/python-311-c9s:c9s AS base WORKDIR /opt/app-root/bin -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # OS Packages needs to be installed as root USER root @@ -163,11 +163,12 @@ COPY ${RSTUDIO_SOURCE_CODE}/run-rstudio.sh ${RSTUDIO_SOURCE_CODE}/setup_rstudio. USER 1001 -COPY ${RSTUDIO_SOURCE_CODE}/Pipfile.lock ./ +COPY ${RSTUDIO_SOURCE_CODE}/requirements.txt ./ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \ fix-permissions /opt/app-root -P diff --git a/rstudio/c9s-python-3.11/Dockerfile.cuda b/rstudio/c9s-python-3.11/Dockerfile.cuda index 601c3adb35..1ebd7c273b 100644 --- a/rstudio/c9s-python-3.11/Dockerfile.cuda +++ b/rstudio/c9s-python-3.11/Dockerfile.cuda @@ -5,8 +5,8 @@ FROM quay.io/sclorg/python-311-c9s:c9s AS base WORKDIR /opt/app-root/bin -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # OS Packages needs to be installed as root USER root @@ -295,11 +295,12 @@ COPY ${RSTUDIO_SOURCE_CODE}/run-rstudio.sh ${RSTUDIO_SOURCE_CODE}/setup_rstudio. USER 1001 -COPY ${RSTUDIO_SOURCE_CODE}/Pipfile.lock ./ +COPY ${RSTUDIO_SOURCE_CODE}/requirements.txt ./ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \ fix-permissions /opt/app-root -P diff --git a/rstudio/rhel9-python-3.11/Dockerfile.cpu b/rstudio/rhel9-python-3.11/Dockerfile.cpu index 1458f271b1..1b78283b1d 100644 --- a/rstudio/rhel9-python-3.11/Dockerfile.cpu +++ b/rstudio/rhel9-python-3.11/Dockerfile.cpu @@ -5,8 +5,8 @@ FROM registry.redhat.io/rhel9/python-311:latest AS base WORKDIR /opt/app-root/bin -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # OS Packages needs to be installed as root USER root @@ -185,11 +185,12 @@ RUN if [ -d "${SECRET_DIR}" ]; then \ USER 1001 -COPY ${RSTUDIO_SOURCE_CODE}/Pipfile.lock ./ +COPY ${RSTUDIO_SOURCE_CODE}/requirements.txt ./ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \ fix-permissions /opt/app-root -P diff --git a/rstudio/rhel9-python-3.11/Dockerfile.cuda b/rstudio/rhel9-python-3.11/Dockerfile.cuda index 012c7ff22c..5dc2619bce 100644 --- a/rstudio/rhel9-python-3.11/Dockerfile.cuda +++ b/rstudio/rhel9-python-3.11/Dockerfile.cuda @@ -5,8 +5,8 @@ FROM registry.redhat.io/rhel9/python-311:latest AS base WORKDIR /opt/app-root/bin -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # OS Packages needs to be installed as root USER root @@ -343,11 +343,12 @@ RUN if [ -d "${SECRET_DIR}" ]; then \ USER 1001 -COPY ${RSTUDIO_SOURCE_CODE}/Pipfile.lock ./ +COPY ${RSTUDIO_SOURCE_CODE}/requirements.txt ./ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \ fix-permissions /opt/app-root -P diff --git a/runtimes/datascience/ubi9-python-3.11/Dockerfile.cpu b/runtimes/datascience/ubi9-python-3.11/Dockerfile.cpu index 56ed323665..6be7983f9c 100644 --- a/runtimes/datascience/ubi9-python-3.11/Dockerfile.cpu +++ b/runtimes/datascience/ubi9-python-3.11/Dockerfile.cpu @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -43,14 +43,15 @@ LABEL name="odh-notebook-runtime-datascience-ubi9-python-3.11" \ WORKDIR /opt/app-root/bin -# Install Python packages from Pipfile.lock -COPY ${DATASCIENCE_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages from requirements.txt +COPY ${DATASCIENCE_SOURCE_CODE}/requirements.txt ./ # Copy Elyra dependencies for air-gapped enviroment COPY ${DATASCIENCE_SOURCE_CODE}/utils ./utils/ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \ fix-permissions /opt/app-root -P diff --git a/runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu b/runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu index cb9ee5e69b..f8ea7e89fa 100644 --- a/runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu +++ b/runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo libxcrypt-compat && dnf clean all && rm -rf # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -43,14 +43,15 @@ LABEL name="odh-notebook-runtime-datascience-ubi9-python-3.12" \ WORKDIR /opt/app-root/bin -# Install Python packages from Pipfile.lock -COPY ${DATASCIENCE_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages from requirements.txt +COPY ${DATASCIENCE_SOURCE_CODE}/requirements.txt ./ # Copy Elyra dependencies for air-gapped enviroment COPY ${DATASCIENCE_SOURCE_CODE}/utils ./utils/ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.12/site-packages && \ fix-permissions /opt/app-root -P diff --git a/runtimes/minimal/ubi9-python-3.11/Dockerfile.cpu b/runtimes/minimal/ubi9-python-3.11/Dockerfile.cpu index da7ffdd199..08b87c4cfb 100644 --- a/runtimes/minimal/ubi9-python-3.11/Dockerfile.cpu +++ b/runtimes/minimal/ubi9-python-3.11/Dockerfile.cpu @@ -21,8 +21,8 @@ RUN ARCH=$(uname -m) && \ # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -50,14 +50,15 @@ LABEL name="odh-notebook-runtime-minimal-ubi9-python-3.11" \ WORKDIR /opt/app-root/bin -# Install Python packages from Pipfile.lock -COPY ${MINIMAL_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages from requirements.txt +COPY ${MINIMAL_SOURCE_CODE}/requirements.txt ./ # Copy Elyra dependencies for air-gapped enviroment COPY ${MINIMAL_SOURCE_CODE}/utils ./utils/ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \ fix-permissions /opt/app-root -P diff --git a/runtimes/minimal/ubi9-python-3.12/Dockerfile.cpu b/runtimes/minimal/ubi9-python-3.12/Dockerfile.cpu index 5f6b131ea2..94a797d116 100644 --- a/runtimes/minimal/ubi9-python-3.12/Dockerfile.cpu +++ b/runtimes/minimal/ubi9-python-3.12/Dockerfile.cpu @@ -21,8 +21,8 @@ RUN ARCH=$(uname -m) && \ # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -50,14 +50,15 @@ LABEL name="odh-notebook-runtime-minimal-ubi9-python-3.12" \ WORKDIR /opt/app-root/bin -# Install Python packages from Pipfile.lock -COPY ${MINIMAL_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages from requirements.txt +COPY ${MINIMAL_SOURCE_CODE}/requirements.txt ./ # Copy Elyra dependencies for air-gapped enviroment COPY ${MINIMAL_SOURCE_CODE}/utils ./utils/ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.12/site-packages && \ fix-permissions /opt/app-root -P diff --git a/runtimes/pytorch/ubi9-python-3.11/Dockerfile.cuda b/runtimes/pytorch/ubi9-python-3.11/Dockerfile.cuda index 5c8dcf4b02..79c87b87ee 100644 --- a/runtimes/pytorch/ubi9-python-3.11/Dockerfile.cuda +++ b/runtimes/pytorch/ubi9-python-3.11/Dockerfile.cuda @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -171,14 +171,15 @@ LABEL name="odh-notebook-runtime-pytorch-ubi9-python-3.11" \ WORKDIR /opt/app-root/bin -# Install Python packages from Pipfile.lock -COPY ${PYTORCH_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages from requirements.txt +COPY ${PYTORCH_SOURCE_CODE}/requirements.txt ./ # Copy Elyra dependencies for air-gapped enviroment COPY ${PYTORCH_SOURCE_CODE}/utils ./utils/ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \ fix-permissions /opt/app-root -P diff --git a/runtimes/pytorch/ubi9-python-3.12/Dockerfile.cuda b/runtimes/pytorch/ubi9-python-3.12/Dockerfile.cuda index d54e1ee957..ad6aa976fb 100644 --- a/runtimes/pytorch/ubi9-python-3.12/Dockerfile.cuda +++ b/runtimes/pytorch/ubi9-python-3.12/Dockerfile.cuda @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo libxcrypt-compat && dnf clean all && rm -rf # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -145,14 +145,15 @@ LABEL name="odh-notebook-runtime-pytorch-ubi9-python-3.12" \ WORKDIR /opt/app-root/bin -# Install Python packages from Pipfile.lock -COPY ${PYTORCH_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages from requirements.txt +COPY ${PYTORCH_SOURCE_CODE}/requirements.txt ./ # Copy Elyra dependencies for air-gapped enviroment COPY ${PYTORCH_SOURCE_CODE}/utils ./utils/ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.12/site-packages && \ fix-permissions /opt/app-root -P diff --git a/runtimes/rocm-pytorch/ubi9-python-3.11/Dockerfile.rocm b/runtimes/rocm-pytorch/ubi9-python-3.11/Dockerfile.rocm index 7fac171121..1fd3a6a533 100644 --- a/runtimes/rocm-pytorch/ubi9-python-3.11/Dockerfile.rocm +++ b/runtimes/rocm-pytorch/ubi9-python-3.11/Dockerfile.rocm @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -77,16 +77,17 @@ LABEL name="odh-notebook-runtime-rocm-pytorch-ubi9-python-3.11" \ WORKDIR /opt/app-root/bin -# Install Python packages from Pipfile.lock -COPY ${PYTORCH_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages from requirements.txt +COPY ${PYTORCH_SOURCE_CODE}/requirements.txt ./ # Copy Elyra dependencies for air-gapped enviroment COPY ${PYTORCH_SOURCE_CODE}/utils ./utils/ # Copy utility script COPY ${PYTORCH_SOURCE_CODE}/de-vendor-torch.sh ./ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # De-vendor the ROCm libs that are embedded in Pytorch \ ./de-vendor-torch.sh && \ rm ./de-vendor-torch.sh && \ diff --git a/runtimes/rocm-pytorch/ubi9-python-3.12/Dockerfile.rocm b/runtimes/rocm-pytorch/ubi9-python-3.12/Dockerfile.rocm index 7f0ac32f73..78d0340272 100644 --- a/runtimes/rocm-pytorch/ubi9-python-3.12/Dockerfile.rocm +++ b/runtimes/rocm-pytorch/ubi9-python-3.12/Dockerfile.rocm @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo libxcrypt-compat && dnf clean all && rm -rf # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -77,16 +77,17 @@ LABEL name="odh-notebook-runtime-rocm-pytorch-ubi9-python-3.12" \ WORKDIR /opt/app-root/bin -# Install Python packages from Pipfile.lock -COPY ${PYTORCH_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages from requirements.txt +COPY ${PYTORCH_SOURCE_CODE}/requirements.txt ./ # Copy Elyra dependencies for air-gapped enviroment COPY ${PYTORCH_SOURCE_CODE}/utils ./utils/ # Copy utility script COPY ${PYTORCH_SOURCE_CODE}/de-vendor-torch.sh ./ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # De-vendor the ROCm libs that are embedded in Pytorch \ ./de-vendor-torch.sh && \ rm ./de-vendor-torch.sh && \ diff --git a/runtimes/rocm-tensorflow/ubi9-python-3.11/Dockerfile.rocm b/runtimes/rocm-tensorflow/ubi9-python-3.11/Dockerfile.rocm index 6fe79805fa..14655328e4 100644 --- a/runtimes/rocm-tensorflow/ubi9-python-3.11/Dockerfile.rocm +++ b/runtimes/rocm-tensorflow/ubi9-python-3.11/Dockerfile.rocm @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -77,14 +77,15 @@ LABEL name="odh-notebook-rocm-runtime-tensorflow-ubi9-python-3.11" \ WORKDIR /opt/app-root/bin -# Install Python packages from Pipfile.lock -COPY ${TENSORFLOW_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages from requirements.txt +COPY ${TENSORFLOW_SOURCE_CODE}/requirements.txt ./ # Copy Elyra dependencies for air-gapped enviroment COPY ${TENSORFLOW_SOURCE_CODE}/utils ./utils/ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \ fix-permissions /opt/app-root -P diff --git a/runtimes/rocm-tensorflow/ubi9-python-3.12/Dockerfile.rocm b/runtimes/rocm-tensorflow/ubi9-python-3.12/Dockerfile.rocm index e7e8848792..7de1432926 100644 --- a/runtimes/rocm-tensorflow/ubi9-python-3.12/Dockerfile.rocm +++ b/runtimes/rocm-tensorflow/ubi9-python-3.12/Dockerfile.rocm @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -77,14 +77,15 @@ LABEL name="odh-notebook-rocm-runtime-tensorflow-ubi9-python-3.12" \ WORKDIR /opt/app-root/bin -# Install Python packages from Pipfile.lock -COPY ${TENSORFLOW_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages from requirements.txt +COPY ${TENSORFLOW_SOURCE_CODE}/requirements.txt ./ # Copy Elyra dependencies for air-gapped enviroment COPY ${TENSORFLOW_SOURCE_CODE}/utils ./utils/ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.12/site-packages && \ fix-permissions /opt/app-root -P diff --git a/runtimes/tensorflow/ubi9-python-3.11/Dockerfile.cuda b/runtimes/tensorflow/ubi9-python-3.11/Dockerfile.cuda index f74382d1f2..d477076c52 100644 --- a/runtimes/tensorflow/ubi9-python-3.11/Dockerfile.cuda +++ b/runtimes/tensorflow/ubi9-python-3.11/Dockerfile.cuda @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -171,14 +171,15 @@ LABEL name="odh-notebook-cuda-runtime-tensorflow-ubi9-python-3.11" \ WORKDIR /opt/app-root/bin -# Install Python packages from Pipfile.lock -COPY ${TENSORFLOW_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages from requirements.txt +COPY ${TENSORFLOW_SOURCE_CODE}/requirements.txt ./ # Copy Elyra dependencies for air-gapped enviroment COPY ${TENSORFLOW_SOURCE_CODE}/utils ./utils/ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \ fix-permissions /opt/app-root -P diff --git a/runtimes/tensorflow/ubi9-python-3.12/Dockerfile.cuda b/runtimes/tensorflow/ubi9-python-3.12/Dockerfile.cuda index 50a1612baa..430efe61c5 100644 --- a/runtimes/tensorflow/ubi9-python-3.12/Dockerfile.cuda +++ b/runtimes/tensorflow/ubi9-python-3.12/Dockerfile.cuda @@ -14,8 +14,8 @@ RUN dnf install -y mesa-libGL skopeo libxcrypt-compat && dnf clean all && rm -rf # Other apps and tools installed as default user USER 1001 -# Install micropipenv to deploy packages from Pipfile.lock -RUN pip install --no-cache-dir -U "micropipenv[toml]" +# Install micropipenv and uv to deploy packages from requirements.txt +RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv" # Install the oc client begin RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \ @@ -150,14 +150,15 @@ LABEL name="odh-notebook-cuda-runtime-tensorflow-ubi9-python-3.12" \ WORKDIR /opt/app-root/bin -# Install Python packages from Pipfile.lock -COPY ${TENSORFLOW_SOURCE_CODE}/Pipfile.lock ./ +# Install Python packages from requirements.txt +COPY ${TENSORFLOW_SOURCE_CODE}/requirements.txt ./ # Copy Elyra dependencies for air-gapped enviroment COPY ${TENSORFLOW_SOURCE_CODE}/utils ./utils/ RUN echo "Installing softwares and packages" && \ - micropipenv install && \ - rm -f ./Pipfile.lock && \ + # This may have to download and compile some dependencies, and as we don't lock requirements from `build-system.requires`, + # we often don't know the correct hashes and `--require-hashes` would therefore fail on non amd64, where building is common. + 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 && \ # Fix permissions to support pip in Openshift environments \ chmod -R g+w /opt/app-root/lib/python3.12/site-packages && \ fix-permissions /opt/app-root -P