# 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", "SupraLabs/Supra-1.5-50M-instruct-exp-gguf", \ "--hf-file", "Supra-1.5-50M-Instruct-exp.Q8_0.gguf", \ "--host", "0.0.0.0", \ "--port", "7860", \ "-c", "10240", \ "--parallel", "2", \ "--kv-unified", \ "--threads", "2", \ "--threads-batch", "2", \ "--batch-size", "256", \ "--ubatch-size", "64", \ "--temp", "0.7", \ "--top-k", "50", \ "--repeat-penalty", "1.15", \ "--flash-attn", "on" \ ]