Skip to content

Commit 2b2046a

Browse files
committed
pytorch: remove old pip/setuptools/wheel pkgs
1 parent f1d4167 commit 2b2046a

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

ML-Frameworks/pytorch-aarch64/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ RUN echo 'export PATH="$HOME/.local/bin:$PATH"' >> /etc/bash.bashrc
6565
WORKDIR /home/$DOCKER_USER
6666
USER $DOCKER_USER
6767

68+
# Update to newer pip/setuptools/wheel (setuptools>= 70.0.0 due to CVE-2024-6345 and CVE-2025-47273)
69+
# and delete old system version (we essentially use apt:python3-pip to bootstrap pip)
70+
RUN pip install --upgrade pip~=25.2 setuptools~=78.1.1 wheel~=0.45.1 \
71+
&& sudo rm -r /usr/lib/python3/dist-packages/
72+
6873
# Base requirements for examples, excluding torch and torch*
69-
RUN pip install --upgrade pip
7074
COPY requirements.txt ./
7175
RUN pip install -r requirements.txt
7276

ML-Frameworks/pytorch-aarch64/requirements.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ PyYAML~=6.0.2
2828
regex==2024.9.11
2929
requests~=2.32.3
3030
safetensors~=0.4.5
31-
setuptools~=78.1.1 # >= 70.0.0 due to CVE-2024-6345 and CVE-2025-47273
3231
six~=1.16.0
3332
sympy~=1.13.1
3433
tiktoken~=0.9.0
@@ -38,5 +37,3 @@ transformers~=4.55.2 # >= 4.50.0 due to CVE-2025-2099
3837
typing_extensions~=4.12.2
3938
tzdata==2024.2
4039
urllib3~=2.2.3
41-
wheel~=0.38.0 # >= 0.38.0 due to CVE-2022-40898
42-

0 commit comments

Comments
 (0)