File size: 488 Bytes
7d3f76e
 
 
7066ded
 
2a69053
7d3f76e
7066ded
 
 
 
7d3f76e
 
 
 
 
dce0a29
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM python:3.11-slim

WORKDIR /app
# Install build tools for llama-cpp-python (C++ compiler)
RUN apt-get update && apt-get install -y g++ build-essential cmake curl && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
# Force single-threaded compilation to prevent OOMKilled on Hugging Face Spaces
ENV CMAKE_BUILD_PARALLEL_LEVEL=1
ENV MAKEFLAGS="-j1"
RUN pip install --no-cache-dir -r requirements.txt
COPY . .

# Hugging Face exposes port 7860
EXPOSE 7860

CMD ["python", "main.py"]