chore: use cache for pip
This commit is contained in:
+5
-7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user