# ====================================================== # Savant RRF Φ12.5 — Optimized Dockerfile # ====================================================== FROM python:3.11-slim # -------------------------- # ENV optimizations # -------------------------- ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 \ HF_HOME=/cache/huggingface \ TRANSFORMERS_CACHE=/cache/huggingface \ SENTENCE_TRANSFORMERS_HOME=/cache/huggingface # -------------------------- # Workdir # -------------------------- WORKDIR /app # -------------------------- # System deps (minimal) # -------------------------- RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ git \ && rm -rf /var/lib/apt/lists/* # -------------------------- # Install Python deps (cache-friendly) # -------------------------- COPY requirements.txt . RUN pip install --upgrade pip && \ pip install --no-cache-dir -r requirements.txt # -------------------------- # Preload models (CRITICAL for cold start) # -------------------------- RUN python - <