ubix commited on
Commit
6dde48b
·
verified ·
1 Parent(s): f677a80

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -21
Dockerfile CHANGED
@@ -1,23 +1,15 @@
1
  FROM ghcr.io/ggml-org/llama.cpp:full
2
 
3
- WORKDIR /app
4
-
5
- # パッケージのインストール
6
- RUN apt update && apt install -y python3-pip
7
- RUN pip install -U huggingface_hub
8
-
9
- # モデルをHugging Faceからダウンロード
10
- RUN python3 -c 'from huggingface_hub import hf_hub_download; \
11
- repo="AIencoder/Logic-Coder-7B-Q4_K_M-GGUF"; \
12
- hf_hub_download(repo_id=repo, filename="logic-coder-7b-q4_k_m.gguf", local_dir="/app")'
13
-
14
- # サーバーの設定
15
- CMD ["--server", \
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