Arabic250 commited on
Commit
203d1d8
·
verified ·
1 Parent(s): fe58123

Update Dockerfile

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