Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -40,4 +43,4 @@ VOLUME ["/workspace", "/models"]

EXPOSE 8888

CMD ["python"]
CMD ["python3.12"]
31 changes: 17 additions & 14 deletions phases/00-setup-and-tooling/07-docker-for-ai/docs/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -193,7 +196,7 @@ VOLUME ["/workspace", "/models"]

EXPOSE 8888

CMD ["python"]
CMD ["python3.12"]
```

Build it:
Expand Down