File size: 775 Bytes
9a444d0
2cbbdc9
 
 
40f58a6
 
 
 
 
8a1c52f
40f58a6
494bc63
9a444d0
2cbbdc9
40f58a6
3718e07
2cbbdc9
40f58a6
3718e07
414e142
2cbbdc9
 
 
 
 
0f66a58
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM python:3.10-slim

WORKDIR /app

# The FIX: We added 'libgomp1' to the install list
RUN apt-get update && apt-get install -y \
    wget \
    libgomp1 \
    && rm -rf /var/lib/apt/lists/*

# 1. Install PREBUILT llama-cpp-python
RUN pip install --no-cache-dir \
    https://huggingface.co/Luigi/llama-cpp-python-wheels-hf-spaces-free-cpu/resolve/main/llama_cpp_python-0.3.22-cp310-cp310-linux_x86_64.whl

# 2. Web dependencies
RUN pip install --no-cache-dir fastapi uvicorn[standard] requests

# 3. Model setup
RUN mkdir -p ./models
RUN wget -q -O ./models/gpt-oss-20b-Q3_K_M.gguf \
    https://huggingface.co/unsloth/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-Q3_K_M.gguf

COPY app.py ./app.py

EXPOSE 8000
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]