From 141afb4c204562522e866514e68676fa744ac6ab Mon Sep 17 00:00:00 2001 From: Ismael Date: Fri, 12 Jan 2024 18:03:02 -0400 Subject: [PATCH] reduce image size Added the option `--no-cache-dir` to the `pip3 install` commands on the Dockerfile to reduce the docker image resulting size to 1.89 GB from 2.27 GB. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 64a30753..ecfd3a2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,8 +41,8 @@ WORKDIR /app/backend COPY ./backend/requirements.txt ./requirements.txt -RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu -RUN pip3 install -r requirements.txt +RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu --no-cache-dir +RUN pip3 install -r requirements.txt --no-cache-dir # RUN python -c "from sentence_transformers import SentenceTransformer; model = SentenceTransformer('all-MiniLM-L6-v2')"