CoolFace
Apppublic

blizzarman/polyglot-tutor

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
Dockerfile32 linesDownload Raw Back to root
1# Runtime image for HF Spaces (Docker SDK, cpu-basic) and GHCR.2# Heavy ML deps (torch, transformers) are deliberately absent until M1,3# and training deps never enter this image (see docs/adr/0001).4FROM python:3.12-slim-bookworm5 6# uv — pinned to the same version as local dev7COPY --from=ghcr.io/astral-sh/uv:0.11.20 /uv /uvx /bin/8 9ENV UV_COMPILE_BYTECODE=1 \10    UV_LINK_MODE=copy \11    UV_PYTHON_DOWNLOADS=never \12    PYTHONUNBUFFERED=113 14# Non-root user with uid 1000 (Hugging Face Spaces requirement)15RUN useradd -m -u 1000 app16WORKDIR /app17 18# Layer 1: dependencies only (cached as long as pyproject/uv.lock don't change)19COPY pyproject.toml uv.lock ./20RUN uv sync --frozen --no-install-project --no-dev21 22# Layer 2: project code23COPY README.md ./24COPY src ./src25RUN uv sync --frozen --no-dev && chown -R app:app /app26 27USER app28ENV PATH="/app/.venv/bin:$PATH"29EXPOSE 786030 31CMD ["python", "-m", "tutor.app.main"]32