Spaces:
Running
Running
Download Dockerfile from MonteeqOrg/backend: direct link, hf CLI and curl.
- Browser
- Download file 851 Bytes
-
https://huggingface.co/spaces/MonteeqOrg/backend/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/MonteeqOrg/backend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/MonteeqOrg/backend/resolve/main/Dockerfile
851 Bytes
| FROM python:3.13-slim | |
| # Prevent Python from writing pyc files and buffering stdout/stderr | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PORT=7860 | |
| WORKDIR /app | |
| # Install system dependencies (build-essential, libpq-dev for Postgres, curl) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| libpq-dev \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy only requirements first to leverage Docker layer caching | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the application code | |
| COPY . . | |
| # Make startup script executable | |
| RUN chmod +x start.sh | |
| # Hugging Face Spaces requires port 7860 | |
| EXPOSE 7860 | |
| # Celery (background) + gunicorn with 2β4 uvicorn workers (see start.sh) | |
| CMD ["./start.sh"] | |