Skip to content

Commit c3d8b3b

Browse files
committed
Docker/Accelerated Python: Upgrade pip during the build and never use a pip cache.
1 parent a570943 commit c3d8b3b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tutorials/accelerated-python/brev/dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ COPY tutorials/${ACH_TUTORIAL}/brev/requirements.txt /opt/requirements.txt
1818

1919
# Remove externally managed flag and install Python packages.
2020
RUN rm -f /usr/lib/python3.*/EXTERNALLY-MANAGED \
21+
&& python -m pip install --no-cache-dir --root-user-action=ignore --upgrade pip \
2122
&& pip install --no-cache-dir --root-user-action=ignore -r /opt/requirements.txt \
2223
&& rm -f /opt/requirements.txt
2324

@@ -45,8 +46,8 @@ RUN mkdir -p ~/.local/state/._bash_history \
4546
# Create an isolated Python env with cuDF and cuML, and register it as a Jupyter kernel
4647
ENV ACH_RAPIDS_VENV=/opt/venvs/rapids
4748
RUN python -m venv ${ACH_RAPIDS_VENV} \
48-
&& ${ACH_RAPIDS_VENV}/bin/python -m pip install --upgrade pip \
49-
&& ${ACH_RAPIDS_VENV}/bin/pip install \
49+
&& ${ACH_RAPIDS_VENV}/bin/python -m pip install --no-cache-dir --upgrade pip \
50+
&& ${ACH_RAPIDS_VENV}/bin/pip install --no-cache-dir \
5051
--extra-index-url=https://pypi.nvidia.com \
5152
"cudf-cu12==25.10.*" \
5253
"cuml-cu12==25.10.*" \

0 commit comments

Comments
 (0)