Spaces:
Paused
Paused
Download Dockerfile from telegramjobupload/README: direct link, hf CLI and curl.
- Browser
- Download file 775 Bytes
-
https://huggingface.co/spaces/telegramjobupload/README/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/telegramjobupload/README/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/telegramjobupload/README/resolve/main/Dockerfile
775 Bytes
| FROM mcr.microsoft.com/playwright/python:v1.40.0-jammy | |
| # Set environment variable to ensure prints are flushed instantly | |
| ENV PYTHONUNBUFFERED=1 | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements and install dependencies as root | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy all application files | |
| COPY . . | |
| # Change ownership of the folder to user 1000 so Hugging Face can write screenshots to it! | |
| RUN chown -R 1000:1000 /app | |
| # Switch to the Hugging Face restricted user | |
| USER 1000 | |
| # Expose the required Hugging Face port | |
| EXPOSE 7860 | |
| # Start Xvfb in the background and run the Flask app directly | |
| CMD ["/bin/sh", "-c", "Xvfb :99 -screen 0 1280x1024x24 -ac +extension GLX +render -noreset & export DISPLAY=:99 && python main.py"] | |