Skip to content

Commit 1ff86d0

Browse files
fix(phase-00/07): fix Python 3.12 pip bootstrap and update PyTorch to 2.5.1
1 parent 44b9b14 commit 1ff86d0

2 files changed

Lines changed: 29 additions & 23 deletions

File tree

phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,26 @@ ENV DEBIAN_FRONTEND=noninteractive
44
ENV PYTHONUNBUFFERED=1
55

66
RUN apt-get update && apt-get install -y --no-install-recommends \
7-
python3.12 \
8-
python3.12-venv \
9-
python3.12-dev \
10-
python3-pip \
11-
git \
12-
curl \
13-
build-essential \
7+
software-properties-common \
8+
&& add-apt-repository ppa:deadsnakes/ppa \
9+
&& apt-get update && apt-get install -y --no-install-recommends \
10+
python3.12 \
11+
python3.12-venv \
12+
python3.12-dev \
13+
git \
14+
curl \
15+
build-essential \
1416
&& rm -rf /var/lib/apt/lists/*
1517

1618
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
1719

18-
RUN python -m pip install --no-cache-dir --upgrade pip setuptools wheel
20+
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 \
21+
&& python -m pip install --no-cache-dir --upgrade pip setuptools wheel
1922

2023
RUN python -m pip install --no-cache-dir \
21-
torch==2.3.1 \
22-
torchvision==0.18.1 \
23-
torchaudio==2.3.1 \
24+
torch==2.5.1 \
25+
torchvision==0.20.1 \
26+
torchaudio==2.5.1 \
2427
--index-url https://download.pytorch.org/whl/cu124
2528

2629
RUN python -m pip install --no-cache-dir \
@@ -40,4 +43,4 @@ VOLUME ["/workspace", "/models"]
4043

4144
EXPOSE 8888
4245

43-
CMD ["python"]
46+
CMD ["python"]

phases/00-setup-and-tooling/07-docker-for-ai/docs/en.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -157,23 +157,26 @@ ENV DEBIAN_FRONTEND=noninteractive
157157
ENV PYTHONUNBUFFERED=1
158158

159159
RUN apt-get update && apt-get install -y --no-install-recommends \
160-
python3.12 \
161-
python3.12-venv \
162-
python3.12-dev \
163-
python3-pip \
164-
git \
165-
curl \
166-
build-essential \
160+
software-properties-common \
161+
&& add-apt-repository ppa:deadsnakes/ppa \
162+
&& apt-get update && apt-get install -y --no-install-recommends \
163+
python3.12 \
164+
python3.12-venv \
165+
python3.12-dev \
166+
git \
167+
curl \
168+
build-essential \
167169
&& rm -rf /var/lib/apt/lists/*
168170

169171
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
170172

171-
RUN python -m pip install --no-cache-dir --upgrade pip setuptools wheel
173+
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 \
174+
&& python -m pip install --no-cache-dir --upgrade pip setuptools wheel
172175

173176
RUN python -m pip install --no-cache-dir \
174-
torch==2.3.1 \
175-
torchvision==0.18.1 \
176-
torchaudio==2.3.1 \
177+
torch==2.5.1 \
178+
torchvision==0.20.1 \
179+
torchaudio==2.5.1 \
177180
--index-url https://download.pytorch.org/whl/cu124
178181

179182
RUN python -m pip install --no-cache-dir \

0 commit comments

Comments
 (0)