Spaces:
Runtime error
Runtime error
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| WORKDIR /app | |
| # System deps (optional) | |
| RUN apt-get update && apt-get install -y --no-install-recommends build-essential && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| # Copy app | |
| COPY . /app | |
| # Expose the port expected by HF ($PORT will be provided) | |
| ENV PORT=7860 | |
| CMD ["gunicorn", "-b", "0.0.0.0:${PORT}", "api:app", "--workers", "4", "--threads", "8", "--timeout", "180"] | |