# Dockerfile — Python runner for the Day-1 sampling + model-A/B lab
# Base image pinned by index-digest (ADR-6).
# Re-resolve: docker buildx imagetools inspect python:3.12-slim --format '{{.Manifest.Digest}}'
FROM python:3.12-slim@sha256:423ed6ab25b1921a477529254bfeeabf5855151dc2c3141699a1bfc852199fbf

WORKDIR /workspace

# Install Python deps first (layer-cached unless requirements.txt changes).
# pip runs at BUILD time only — never at demo time (ADR-5 offline guarantee).
COPY app/requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Bake app + data + prompts so the image works standalone (compose mounts override at runtime)
COPY app/ ./app/
COPY data/ ./data/
COPY prompts/ ./prompts/

CMD ["python", "app/sampling_ab.py"]
