Spaces:
Running
Running
File size: 491 Bytes
134649f ea01671 134649f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | FROM python:3.12-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Run as a non-root user (HF recommends uid 1000). data/ must stay writable: the pick
# panels and the risk screen cache there (ephemeral — a restart just recomputes).
RUN useradd -m -u 1000 app
COPY --chown=app:app . .
USER app
# HF Spaces serve on 7860
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|