Arabic250 commited on
Commit
84afcdd
·
verified ·
1 Parent(s): d1dc867

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 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
+ CMD ["llama-server", \
20
+ "-m", "/app/gemma-4-E4B-it-UD-Q5_K_XL.gguf", \
21
+ "--mmproj", "/app/mmproj-BF16.gguf", \
22
+ "--host", "0.0.0.0", \
23
+ "--port", "7860", \
24
+ "-t", "2", \
25
+ "--cache-type-k", "q8_0", \
26
+ "--cache-type-v", "iq4_nl", \
27
+ "-c", "8192", \
28
+ "-n", "4096", \
29
+ "--api-key", "my_secure_password_123"]