Spaces:
Sleeping
Sleeping
File size: 683 Bytes
284e818 ed70eb7 284e818 71c08ae 284e818 | 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 | # Hugging Face Spaces (Docker SDK) — serves the PWA on port 7860.
FROM python:3.11-slim
# A TrueType font so the build can render the social-share card (og-card.png).
RUN apt-get update \
&& apt-get install -y --no-install-recommends fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
# HF Spaces run as a non-root user with UID 1000.
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PORT=7860 \
TZ=Europe/Paris \
PYTHONUNBUFFERED=1
WORKDIR $HOME/app
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt
COPY --chown=user . .
EXPOSE 7860
CMD ["python", "app.py"]
|