Update Dockerfile
Browse files- 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 |
-
# تحميل نموذج
|
| 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 |
-
# تشغيل خادم
|
| 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 |
-
"-
|
|
|
|
| 26 |
"--cache-type-k", "q8_0", \
|
| 27 |
"--cache-type-v", "iq4_nl", \
|
| 28 |
-
"-c", "
|
| 29 |
-
"-n", "
|
| 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"]
|
|
|