From 70436142a05e53c65844a779a2fee824e8e71171 Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Fri, 10 Jul 2026 09:52:18 +0200 Subject: [PATCH] pip multi-stage to detect errors --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9c4b25c..6801215 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,11 +37,11 @@ WORKDIR /app # Install Python packages COPY requirements.txt . -RUN pip install --no-cache-dir --upgrade pip && \ - pip install --no-cache-dir --prefix=/install -r requirements.txt && \ - # Clean up unnecessary files to reduce image size - find /install -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true && \ - find /install -type f -name "*.pyc" -delete && \ +RUN pip install --no-cache-dir --upgrade pip +RUN pip install --no-cache-dir --prefix=/install -r requirements.txt +# Clean up unnecessary files to reduce image size (failures here are non-fatal) +RUN find /install -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true && \ + find /install -type f -name "*.pyc" -delete 2>/dev/null || true && \ find /install -type d -name "tests" -exec rm -rf {} + 2>/dev/null || true && \ find /install -type d -name "*.dist-info" -exec rm -rf {}/RECORD {} + 2>/dev/null || true