FROM mcr.microsoft.com/playwright/python:v1.58.0-jammy # Playwright image already has a default user "pwuser" with UID 1000, # which is exactly what Hugging Face needs. We don't need to create one. USER pwuser ENV HOME=/home/pwuser \ PATH=/home/pwuser/.local/bin:$PATH WORKDIR $HOME/app COPY --chown=pwuser . $HOME/app RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r requirements.txt # Start FastAPI app on port 7860 CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]