Spaces:
Runtime error
Runtime error
| # HuggingFace Space — NPS AI Inference API | |
| # SDK: Docker | Port: 7860 | |
| FROM python:3.10-slim | |
| # Dépendances système | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc g++ \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /code | |
| # Dépendances Python | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Code | |
| COPY . . | |
| # Port HuggingFace Spaces | |
| EXPOSE 7860 | |
| # Utilisateur non-root (requis par HF Spaces) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| PYTHONPATH=/code | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] | |