Upgrade python (3.9 -> 3.11) version for Docker CPU

This commit is contained in:
Ahmet Öner
2023-02-04 22:08:15 +01:00
parent 321a00c148
commit 88982d30f2

View File

@@ -1,6 +1,5 @@
FROM python:3.9.9-slim
FROM python:3.11-slim
ENV POETRY_VERSION=1.2.0
ENV POETRY_VENV=/app/.venv
RUN export DEBIAN_FRONTEND=noninteractive \
@@ -11,7 +10,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
RUN python3 -m venv $POETRY_VENV \
&& $POETRY_VENV/bin/pip install -U pip setuptools \
&& $POETRY_VENV/bin/pip install poetry==${POETRY_VERSION}
&& $POETRY_VENV/bin/pip install poetry
ARG TARGETPLATFORM
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then $POETRY_VENV/bin/pip install torch==1.13.0 -f https://download.pytorch.org/whl/cpu; fi;