Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| # Install system dependencies required to build llama-cpp | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| & rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Set environment variables for llama-cpp optimization (CPU) | |
| ENV LLAMA_ARG_MMAP=1 | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Expose port 7860 as required by Hugging Face Spaces | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |