File size: 954 Bytes
2190dc6
 
 
 
 
 
0402f09
 
 
 
 
7cf8efb
 
 
68f9320
9151501
68f9320
 
9151501
 
68f9320
 
 
9151501
68f9320
 
 
 
 
 
 
9151501
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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" \
]