From 29107603e459e77cdddd485b337683e2a529e33f Mon Sep 17 00:00:00 2001 From: ggoknar Date: Mon, 30 Oct 2023 22:37:35 +0300 Subject: [PATCH] purge pip cache (smaller image) --- server/Dockerfile | 3 ++- server/Dockerfile.cuda118 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 53e530f..0a9ec86 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,7 +1,8 @@ FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel WORKDIR /app COPY requirements.frozen.txt . -RUN python -m pip install --no-deps -r requirements.frozen.txt +RUN python -m pip install --no-deps -r requirements.frozen.txt \ + && python -m pip cache purge COPY main.py . diff --git a/server/Dockerfile.cuda118 b/server/Dockerfile.cuda118 index a097bca..d8fb1a1 100644 --- a/server/Dockerfile.cuda118 +++ b/server/Dockerfile.cuda118 @@ -1,7 +1,8 @@ FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-devel WORKDIR /app COPY requirements.txt . -RUN python -m pip install --use-deprecated=legacy-resolver -r requirements.txt +RUN python -m pip install --use-deprecated=legacy-resolver -r requirements.txt \ + && python -m pip cache purge COPY main.py .