prix-carburant / Dockerfile
SamDNX's picture
Reliability + accuracy + features: routing fallback, tolls, EV price, filters, trends, dark mode, URL state, social card
ed70eb7
Raw
History Blame Contribute Delete
683 Bytes
# 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"]