Arabic250 commited on
Commit
ca1a1ba
·
verified ·
1 Parent(s): c206bd3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -16
Dockerfile CHANGED
@@ -2,26 +2,32 @@ FROM ghcr.io/ggml-org/llama.cpp:full
2
 
3
  WORKDIR /app
4
 
5
- RUN apt update && apt install -y python3 python3-pip python3-venv
 
 
 
 
 
6
  RUN python3 -m venv /opt/venv
7
  ENV PATH="/opt/venv/bin:$PATH"
8
 
9
  RUN pip install -U pip huggingface_hub
10
 
11
- # تحميل النموذج وملف الرؤية (Vision)
12
  RUN python3 -c 'from huggingface_hub import hf_hub_download; \
13
- repo="arabic250/gemma-4-E4B-it-GGUF"; \
14
- hf_hub_download(repo_id=repo, filename="gemma-4-E4B-it-UD-Q5_K_XL.gguf", local_dir="/app"); \
15
- hf_hub_download(repo_id=repo, filename="mmproj-BF16.gguf", local_dir="/app")'
16
 
17
- # تشغيل الخادم (تم حذف --cors لأنه غير مدعوم في هذا الإصدار)
18
- CMD ["--server", \
19
- "-m", "/app/gemma-4-E4B-it-UD-Q5_K_XL.gguf", \
20
- "--mmproj", "/app/mmproj-BF16.gguf", \
21
- "--host", "0.0.0.0", \
22
- "--port", "7860", \
23
- "-t", "4", \
24
- "--cache-type-k", "q8_0", \
25
- "--cache-type-v", "iq4_nl", \
26
- "-c", "2048", \
27
- "-n", "1024"]
 
 
 
2
 
3
  WORKDIR /app
4
 
5
+ RUN apt-get update && apt-get install -y \
6
+ python3 \
7
+ python3-pip \
8
+ python3-venv \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
  RUN python3 -m venv /opt/venv
12
  ENV PATH="/opt/venv/bin:$PATH"
13
 
14
  RUN pip install -U pip huggingface_hub
15
 
 
16
  RUN python3 -c 'from huggingface_hub import hf_hub_download; \
17
+ repo="arabic250/gemma-4-E4B-it-GGUF"; \
18
+ hf_hub_download(repo_id=repo, filename="gemma-4-E4B-it-UD-Q5_K_XL.gguf", local_dir="/app"); \
19
+ hf_hub_download(repo_id=repo, filename="mmproj-BF16.gguf", local_dir="/app")'
20
 
21
+ # استخدام sh -c لتمرير المتغيرات الديناميكية مثل $(nproc) لمعرفة عدد الأنوية
22
+ CMD ["sh", "-c", "./llama-server \
23
+ -m /app/gemma-4-E4B-it-UD-Q5_K_XL.gguf \
24
+ --mmproj /app/mmproj-BF16.gguf \
25
+ --host 0.0.0.0 \
26
+ --port 7860 \
27
+ -t $(nproc) \
28
+ -tb $(nproc) \
29
+ --cache-type-k q8_0 \
30
+ --cache-type-v q8_0 \
31
+ -fa \
32
+ -c 2048 \
33
+ -n 1024"]