| # Based on https://github.com/astral-sh/uv-docker-example/blob/main/README.md | |
| FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| ENV PATH="/app/.venv/bin:$PATH" | |
| ENV DATASET_PATH="/data/2026-04-23_prompt_evaluation_dataset.jsonl" | |
| ENV DB_PATH="/data/annotations.db" | |
| # Copy dependency files first (better layer caching) | |
| COPY --chown=user pyproject.toml .python-version uv.lock ./ | |
| RUN uv sync --locked | |
| COPY --chown=user app.py . | |
| COPY --chown=user index.html . | |
| # Persistent storage for annotations (enable in HF Space settings) | |
| RUN mkdir -p /data && chown user:user /data | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |