Remove torch GPU dependencies from the Docker.full image (#665)

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
This commit is contained in:
bsilvereagle 2023-04-02 15:13:03 -07:00 committed by GitHub
parent d8d4e865cd
commit a0c0516416
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,8 @@ RUN apt-get update && \
apt-get install -y build-essential python3 python3-pip apt-get install -y build-essential python3 python3-pip
RUN pip install --upgrade pip setuptools wheel \ 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 WORKDIR /app