diff --git a/phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile b/phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile index 82958af90..47c6f6439 100644 --- a/phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile +++ b/phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile @@ -4,26 +4,29 @@ ENV DEBIAN_FRONTEND=noninteractive ENV PYTHONUNBUFFERED=1 RUN apt-get update && apt-get install -y --no-install-recommends \ - python3.12 \ - python3.12-venv \ - python3.12-dev \ - python3-pip \ - git \ - curl \ - build-essential \ + software-properties-common \ + && add-apt-repository ppa:deadsnakes/ppa \ + && apt-get update && apt-get install -y --no-install-recommends \ + python3.12 \ + python3.12-venv \ + python3.12-dev \ + git \ + curl \ + build-essential \ && rm -rf /var/lib/apt/lists/* RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1 -RUN python -m pip install --no-cache-dir --upgrade pip setuptools wheel +RUN python3.12 -m ensurepip --upgrade \ + && python3.12 -m pip install --no-cache-dir --upgrade pip setuptools wheel -RUN python -m pip install --no-cache-dir \ - torch==2.3.1 \ - torchvision==0.18.1 \ - torchaudio==2.3.1 \ +RUN python3.12 -m pip install --no-cache-dir \ + torch==2.5.1 \ + torchvision==0.20.1 \ + torchaudio==2.5.1 \ --index-url https://download.pytorch.org/whl/cu124 -RUN python -m pip install --no-cache-dir \ +RUN python3.12 -m pip install --no-cache-dir --ignore-installed blinker \ numpy \ pandas \ scikit-learn \ @@ -40,4 +43,4 @@ VOLUME ["/workspace", "/models"] EXPOSE 8888 -CMD ["python"] +CMD ["python3.12"] \ No newline at end of file diff --git a/phases/00-setup-and-tooling/07-docker-for-ai/docs/en.md b/phases/00-setup-and-tooling/07-docker-for-ai/docs/en.md index f4e2b28c9..0ac9a89aa 100644 --- a/phases/00-setup-and-tooling/07-docker-for-ai/docs/en.md +++ b/phases/00-setup-and-tooling/07-docker-for-ai/docs/en.md @@ -157,26 +157,29 @@ ENV DEBIAN_FRONTEND=noninteractive ENV PYTHONUNBUFFERED=1 RUN apt-get update && apt-get install -y --no-install-recommends \ - python3.12 \ - python3.12-venv \ - python3.12-dev \ - python3-pip \ - git \ - curl \ - build-essential \ + software-properties-common \ + && add-apt-repository ppa:deadsnakes/ppa \ + && apt-get update && apt-get install -y --no-install-recommends \ + python3.12 \ + python3.12-venv \ + python3.12-dev \ + git \ + curl \ + build-essential \ && rm -rf /var/lib/apt/lists/* RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1 -RUN python -m pip install --no-cache-dir --upgrade pip setuptools wheel +RUN python3.12 -m ensurepip --upgrade \ + && python3.12 -m pip install --no-cache-dir --upgrade pip setuptools wheel -RUN python -m pip install --no-cache-dir \ - torch==2.3.1 \ - torchvision==0.18.1 \ - torchaudio==2.3.1 \ +RUN python3.12 -m pip install --no-cache-dir \ + torch==2.5.1 \ + torchvision==0.20.1 \ + torchaudio==2.5.1 \ --index-url https://download.pytorch.org/whl/cu124 -RUN python -m pip install --no-cache-dir \ +RUN python3.12 -m pip install --no-cache-dir --ignore-installed blinker \ numpy \ pandas \ scikit-learn \ @@ -193,7 +196,7 @@ VOLUME ["/workspace", "/models"] EXPOSE 8888 -CMD ["python"] +CMD ["python3.12"] ``` Build it: