Spaces:
Sleeping
Sleeping
Download Dockerfile from Asish22/Sentinel_V2: direct link, hf CLI and curl.
- Browser
- Download file 773 Bytes
-
https://huggingface.co/spaces/Asish22/Sentinel_V2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Asish22/Sentinel_V2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Asish22/Sentinel_V2/resolve/main/Dockerfile
773 Bytes
| FROM python:3.11-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create non-root user (required by HF Spaces) | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| # Copy and install requirements as root (system-wide) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the entire application | |
| COPY . . | |
| # Make the app directory writable by user (for SQLite DB, logs, JSON files) | |
| RUN chown -R user:user /app | |
| # Switch to non-root user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH="/home/user/.local/bin:$PATH" \ | |
| PYTHONUNBUFFERED=1 | |
| # Expose the port Hugging Face expects | |
| EXPOSE 7860 | |
| # Run the orchestration script | |
| CMD ["python", "main.py"] | |