Skip to content

Commit

Permalink
Remove torch GPU dependencies from the Docker.full image (ggerganov#665)
Browse files Browse the repository at this point in the history
By using `pip install torch --index-url https://download.pytorch.org/whl/cpu`
instead of `pip install torch` we can specify we want to install a CPU-only version
of PyTorch without any GPU dependencies. This reduces the size of the Docker image
from 7.32 GB to 1.62 GB
  • Loading branch information
bsilvereagle authored Apr 2, 2023
1 parent d8d4e86 commit a0c0516
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .devops/full.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ RUN apt-get update && \
apt-get install -y build-essential python3 python3-pip

RUN pip install --upgrade pip setuptools wheel \
&& pip install numpy requests sentencepiece torch tqdm
&& pip install numpy requests sentencepiece tqdm \
&& pip install torch --index-url https://download.pytorch.org/whl/cpu

WORKDIR /app

Expand Down

0 comments on commit a0c0516

Please sign in to comment.