Spaces:
Sleeping
Sleeping
Download Dockerfile from WebashalarForML/Play-Scrapper: direct link, hf CLI and curl.
- Browser
- Download file 625 Bytes
-
https://huggingface.co/spaces/WebashalarForML/Play-Scrapper/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/WebashalarForML/Play-Scrapper/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/WebashalarForML/Play-Scrapper/resolve/main/Dockerfile
625 Bytes
| # Use an official Python runtime as a parent image | |
| FROM python:3.11-slim | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| FLASK_APP=app.py \ | |
| HOME=/home/user | |
| # Create a non-root user | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| WORKDIR $HOME/app | |
| # Copy requirements and install | |
| COPY --chown=user requirement.txt . | |
| RUN pip install --no-cache-dir --user -r requirement.txt | |
| # Add user bin to path | |
| ENV PATH="/home/user/.local/bin:${PATH}" | |
| # Copy the rest of the application | |
| COPY --chown=user . . | |
| # Hugging Face Spaces required port | |
| EXPOSE 7860 | |
| # Launch the app | |
| CMD ["python", "app.py"] | |