FROM python:3.10-slim # Set up the working directory WORKDIR /app # Install system dependencies required to compile llama-cpp-python RUN apt-get update && apt-get install -y \ build-essential \ curl \ && rm -rf /var/lib/apt/lists/* # Copy requirements and install them COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the API code COPY app.py . # Expose the specific port Hugging Face Spaces requires EXPOSE 7860 # Start the server CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]