# Use slim Python image FROM python:3.11-slim # Prevent Python buffering ENV PYTHONUNBUFFERED=1 # Set working directory WORKDIR /app # Install system deps (minimal) RUN apt-get update && apt-get install -y \ git \ curl \ build-essential \ && rm -rf /var/lib/apt/lists/* # Install uv (fast dependency manager) RUN pip install --no-cache-dir uv # Copy project files COPY . . # Install dependencies RUN uv pip install --system -r requirements.txt # Default command CMD ["python", "inference.py"]