test1111111 / Dockerfile
spitfire4794's picture
Update Dockerfile
43e6b0f verified
Raw
History Blame Contribute Delete
928 Bytes
# Use the official, precompiled llama-server image
FROM ghcr.io/ggml-org/llama.cpp:server
# Expose port 7860 (Hugging Face's default)
EXPOSE 7860
# Redirect all caches to /tmp (which is globally writable on HF Spaces)
# This prevents the permission errors when downloading GGUF files
ENV LLAMA_CACHE="/tmp"
ENV HF_HOME="/tmp"
# Corrected binary path
ENTRYPOINT ["/app/llama-server"]
# Run llama-server with CPU-tier optimizations, queuing requests to guarantee 40-50 TPS per user
CMD [ \
"--hf-repo", "unsloth/LFM2.5-230M-GGUF", \
"--hf-file", "LFM2.5-230M-UD-Q4_K_XL.gguf", \
"--host", "0.0.0.0", \
"--port", "7860", \
"-c", "65536", \
"--parallel", "2", \
"--kv-unified", \
"--threads", "2", \
"--threads-batch", "2", \
"--batch-size", "256", \
"--ubatch-size", "64", \
"--temp", "0.1", \
"--top-k", "50", \
"--repeat-penalty", "1.05", \
"--flash-attn", "on" \
]