File size: 664 Bytes
2cdd0e3
 
 
 
 
 
 
 
88bb334
2cdd0e3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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"]