Team Ai
Apppublic

oki602960/llama-cpp-python

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
Dockerfile19 linesDownload Raw Back to root
1FROM python:3.10-slim2 3# Install curl4RUN apt-get update && apt-get install -y \5    curl \6    && rm -rf /var/lib/apt/lists/*7 8# Install PRE-COMPILED llama-cpp-python for CPU (Very Fast)9RUN pip install llama-cpp-python[server] --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu10 11# DIRECT DOWNLOAD using curl (Foolproof method without HF CLI)12RUN 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.gguf13 14# Expose the API port15EXPOSE 786016 17# Start the API server18CMD ["python3", "-m", "llama_cpp.server", "--model", "/app/Llama-3.2-3B-Instruct-Q4_K_M.gguf", "--host", "0.0.0.0", "--port", "7860"]19