File size: 733 Bytes
353d8b3
 
0dad949
353d8b3
 
 
 
0dad949
 
353d8b3
e3ea3c0
 
353d8b3
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM python:3.10-slim

# Install curl
RUN apt-get update && apt-get install -y \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Install PRE-COMPILED llama-cpp-python for CPU (Very Fast)
RUN pip install llama-cpp-python[server] --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu

# DIRECT DOWNLOAD using curl (Foolproof method without HF CLI)
RUN mkdir -p /app && curl -L -o /app/Llama-3.2-3B-Instruct-Q4_K_M.gguf https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_K_M.gguf

# Expose the API port
EXPOSE 7860

# Start the API server
CMD ["python3", "-m", "llama_cpp.server", "--model", "/app/Llama-3.2-3B-Instruct-Q4_K_M.gguf", "--host", "0.0.0.0", "--port", "7860"]