Spaces:
Configuration error
Configuration error
File size: 640 Bytes
f4f3994 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
FROM mcr.microsoft.com/playwright/python:v1.57.0-noble
# Hugging Face Docker Spaces runs as UID 1000. Create a matching user to avoid permission issues.
RUN useradd -m -u 1000 user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PYTHONUNBUFFERED=1
WORKDIR $HOME/app
COPY --chown=user requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user . .
# Optional: if you upgrade the Space with persistent disk, /data is mounted at runtime.
RUN mkdir -p /data && chmod 777 /data
USER user
EXPOSE 7860
CMD ["bash","-lc","uvicorn main:app --host 0.0.0.0 --port ${PORT:-7860}"]
|