chore: use cache for pip

This commit is contained in:
2025-10-07 08:09:42 +02:00
parent eb6da3d9cf
commit edefce9703
+5 -7
View File
@@ -4,17 +4,15 @@ FROM python:3.13-slim AS builder
# Set working directory
WORKDIR /app
# # Install system dependencies
# RUN apt-get update && apt-get install -y \
# build-essential \
# curl \
# && rm -rf /var/lib/apt/lists/*
# Create and set pip cache directory
ENV PIP_CACHE_DIR=/root/.cache/pip
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir --no-deps \
# Install Python dependencies with bind-mounted cache
RUN --mount=type=cache,id=pip,target=/root/.cache/pip \
pip install --no-deps \
--disable-pip-version-check \
--target=/app/site-packages \
-r requirements.txt