Skip to content

Commit 56c1dd5

Browse files
committed
pip
1 parent 128e68c commit 56c1dd5

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

cpu/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ RUN \
3737
# Set the default python and install PIP packages
3838
update-alternatives --install /usr/bin/python${PYTHON_VERSION%%.*} python${PYTHON_VERSION%%.*} /usr/bin/python${PYTHON_VERSION} 1 && \
3939
update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1 && \
40-
# install python dependencies
40+
# install python dependencies \
4141
PIP_URL="https://bootstrap.pypa.io/get-pip.py" && \
42-
curl $PIP_URL | python
42+
if [ "${PYTHON_VERSION}" -ne "3.12" ]; then \
43+
curl $PIP_URL | python ; \
44+
fi
4345

4446
ENV PYTHONPATH="/usr/lib/python${PYTHON_VERSION}/site-packages:/usr/local/lib/python${PYTHON_VERSION}/site-packages"
4547

gpu/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ RUN \
3636
python${PYTHON_VERSION} \
3737
python${PYTHON_VERSION}-dev \
3838
$( if [ "${PYTHON_VERSION%%.*}" -eq 3 ] && [ "${PYTHON_VERSION#*.}" -lt 10 ]; then echo "python${PYTHON_VERSION}-distutils"; fi ) \
39+
$( if [ "${PYTHON_VERSION}" -eq "3.12" ]; then echo "python3-pip"; fi ) \
3940
curl \
4041
wget && \
4142
rm -rf /var/lib/apt/lists/* && \
@@ -44,7 +45,9 @@ RUN \
4445
update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1 && \
4546
# install python dependencies
4647
PIP_URL="https://bootstrap.pypa.io/get-pip.py" && \
47-
curl $PIP_URL | python
48+
if [ "${PYTHON_VERSION}" -ne "3.12" ]; then \
49+
curl $PIP_URL | python ; \
50+
fi
4851

4952
ENV PYTHONPATH="/usr/lib/python${PYTHON_VERSION}/site-packages:/usr/local/lib/python${PYTHON_VERSION}/site-packages"
5053

0 commit comments

Comments
 (0)