FROM python:3.12-slim WORKDIR /app COPY backend/requirements.txt ./backend/requirements.txt RUN pip install --no-cache-dir -r backend/requirements.txt COPY backend/ ./backend/ COPY models/ ./models/ COPY scripts/download_hf_dataset.py ./scripts/download_hf_dataset.py # Download the full 216M-variant dataset from HF Datasets at build time. # CACHEBUST invalidates this layer when incremented, forcing a fresh download. ARG CACHEBUST=12 RUN echo "Cache bust: $CACHEBUST" && python scripts/download_hf_dataset.py EXPOSE 8000 CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]