Download Dockerfile from suzmen/PutuAPI: direct link, hf CLI and curl.
- Browser
- Download file 758 Bytes
-
https://huggingface.co/spaces/suzmen/PutuAPI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/suzmen/PutuAPI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/suzmen/PutuAPI/resolve/main/Dockerfile
758 Bytes
| FROM python:3.11-slim | |
| # Install system dependencies for Playwright/Chromium | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| wget gnupg fonts-liberation libnss3 libatk-bridge2.0-0 libdrm2 \ | |
| libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 \ | |
| libasound2 libpangocairo-1.0-0 libgtk-3-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set up a new user named "user" with user ID 1000 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --user -r requirements.txt \ | |
| && python -m playwright install chromium | |
| COPY --chown=user . . | |
| EXPOSE 7860 | |
| CMD ["python", "run.py"] | |