Download Dockerfile from krushimitravit/Pest_Geospatial_Analytics: direct link, hf CLI and curl.
- Browser
- Download file 451 Bytes
-
https://huggingface.co/spaces/krushimitravit/Pest_Geospatial_Analytics/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/krushimitravit/Pest_Geospatial_Analytics/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/krushimitravit/Pest_Geospatial_Analytics/resolve/main/Dockerfile
451 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install dependencies first (layer caching) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # HuggingFace Spaces runs as a non-root user | |
| RUN useradd -m appuser && chown -R appuser /app | |
| USER appuser | |
| EXPOSE 7860 | |
| CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "2", "--threads", "4", "--worker-class", "gthread", "--timeout", "180", "app:app"] | |