Spaces:
Running
Running
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Dépendances système pour llama-cpp + OpenBLAS (accélération CPU) | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| git \ | |
| curl \ | |
| libopenblas-dev \ | |
| liblapack-dev \ | |
| pkg-config \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Installer llama-cpp-python compilé avec OpenBLAS (CRUCIAL - c'est le fix du 503) | |
| RUN CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" \ | |
| pip install --no-cache-dir llama-cpp-python==0.3.4 | |
| # Autres dépendances | |
| RUN pip install --no-cache-dir \ | |
| fastapi==0.111.0 \ | |
| uvicorn==0.29.0 \ | |
| huggingface_hub==0.23.2 \ | |
| python-multipart | |
| COPY app.py . | |
| RUN mkdir -p /app/models | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] |