Spaces:
Sleeping
Sleeping
Download Dockerfile from exploring-solver/deprec: direct link, hf CLI and curl.
- Browser
- Download file 723 Bytes
-
https://huggingface.co/spaces/exploring-solver/deprec/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/exploring-solver/deprec/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/exploring-solver/deprec/resolve/main/Dockerfile
723 Bytes
| # --------------------------------------------------------------- | |
| # DevOpsEnv — Hugging Face Spaces Docker container | |
| # Space SDK: Docker | Port: 7860 | |
| # --------------------------------------------------------------- | |
| FROM python:3.11-slim | |
| # Create non-root user for Hugging Face Spaces | |
| RUN useradd -m -u 1000 appuser | |
| WORKDIR /app | |
| # Install Python dependencies first (layer caching) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY --chown=appuser:appuser . . | |
| USER appuser | |
| # Expose the port HF Spaces expects | |
| EXPOSE 7860 | |
| # Start the FastAPI server (No --reload in production) | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] |