Update Dockerfile
Browse files- Dockerfile +13 -21
Dockerfile
CHANGED
|
@@ -1,23 +1,15 @@
|
|
| 1 |
FROM ghcr.io/ggml-org/llama.cpp:full
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
#
|
| 6 |
-
RUN
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
#
|
| 15 |
-
|
| 16 |
-
"-m", "/app/logic-coder-7b-q4_k_m.gguf", \
|
| 17 |
-
"--host", "0.0.0.0", \
|
| 18 |
-
"--port", "7860", \
|
| 19 |
-
"-t", "2", \
|
| 20 |
-
"--cache-type-k", "q8_0", \
|
| 21 |
-
"--cache-type-v", "iq4_nl", \
|
| 22 |
-
"-c", "32000", \
|
| 23 |
-
"-n", "8000"]
|
|
|
|
| 1 |
FROM ghcr.io/ggml-org/llama.cpp:full
|
| 2 |
|
| 3 |
+
RUN apt update && apt install wget -y
|
| 4 |
+
|
| 5 |
+
# Download model
|
| 6 |
+
RUN wget "https://huggingface.co/unsloth/gemma-3-1b-it-GGUF/resolve/main/gemma-3-1b-it-Q4_K_M.gguf" -O /model.gguf
|
| 7 |
+
|
| 8 |
+
# API-optimized settings: larger context, GPU offload, flash attention
|
| 9 |
+
CMD ["--server", "-m", "/model.gguf", "--port", "7860", "--host", "0.0.0.0",
|
| 10 |
+
"-c", "4096", # Context size: 4K tokens
|
| 11 |
+
"-n", "1024", # Max generation: 1K tokens
|
| 12 |
+
"-ngl", "999", # Offload all layers to GPU (if available)
|
| 13 |
+
"-fa", # Flash Attention for speed
|
| 14 |
+
"--chat-template", "gemma", # Proper chat formatting
|
| 15 |
+
"--timeout", "300"] # 5 min timeout for long requests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|