]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Remove torch GPU dependencies from the Docker.full image (#665)
authorbsilvereagle <redacted>
Sun, 2 Apr 2023 22:13:03 +0000 (15:13 -0700)
committerGitHub <redacted>
Sun, 2 Apr 2023 22:13:03 +0000 (00:13 +0200)
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

.devops/full.Dockerfile

index 2b3a20c635a3ab86e2826cded1cda514acdb7470..a75bc976f54c0f561c6dab6860b078bb694fb166 100644 (file)
@@ -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