Spaces:
Paused
Paused
Download Dockerfile from oki602960/llama-cpp-python: direct link, hf CLI and curl.
- Browser
- Download file 678 Bytes
-
https://huggingface.co/spaces/oki602960/llama-cpp-python/resolve/353d8b33256c6e4fa8744cde04675f22128e30fa/Dockerfile
- Command line
-
hf download hf://spaces/oki602960/llama-cpp-python@353d8b33256c6e4fa8744cde04675f22128e30fa/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/oki602960/llama-cpp-python/resolve/353d8b33256c6e4fa8744cde04675f22128e30fa/Dockerfile
678 Bytes
| FROM python:3.10-slim | |
| # Install necessary packages | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install llama-cpp-python server and huggingface-cli | |
| RUN pip install llama-cpp-python[server] huggingface_hub | |
| # Download Llama-3.2-3B-Instruct Q4_K_M model from bartowski | |
| RUN huggingface-cli download bartowski/Llama-3.2-3B-Instruct-GGUF Llama-3.2-3B-Instruct-Q4_K_M.gguf --local-dir /app --local-dir-use-symlinks False | |
| # 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"] | |