Update Dockerfile
Browse files- Dockerfile +2 -46
Dockerfile
CHANGED
|
@@ -2,7 +2,6 @@ FROM ghcr.io/ggml-org/llama.cpp:full
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install Python
|
| 6 |
RUN apt-get update && \
|
| 7 |
apt-get install -y --no-install-recommends \
|
| 8 |
python3 \
|
|
@@ -10,54 +9,11 @@ RUN apt-get update && \
|
|
| 10 |
python3-venv && \
|
| 11 |
rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
# Python virtual environment
|
| 14 |
RUN python3 -m venv /opt/venv
|
| 15 |
ENV PATH="/opt/venv/bin:${PATH}"
|
| 16 |
|
| 17 |
-
# Install Hugging Face Hub
|
| 18 |
RUN pip install --no-cache-dir --upgrade pip huggingface_hub
|
| 19 |
|
| 20 |
-
|
| 21 |
-
RUN python3 - <<'PY'
|
| 22 |
-
from huggingface_hub import hf_hub_download
|
| 23 |
|
| 24 |
-
|
| 25 |
-
repo_id="bartowski/DeepSeek-Coder-V2-Lite-Instruct-GGUF",
|
| 26 |
-
filename="DeepSeek-Coder-V2-Lite-Instruct-Q4_K_M.gguf",
|
| 27 |
-
local_dir="/app"
|
| 28 |
-
)
|
| 29 |
-
PY
|
| 30 |
-
|
| 31 |
-
CMD [
|
| 32 |
-
"--server",
|
| 33 |
-
|
| 34 |
-
"-m",
|
| 35 |
-
"/app/DeepSeek-Coder-V2-Lite-Instruct-Q4_K_M.gguf",
|
| 36 |
-
|
| 37 |
-
"--host",
|
| 38 |
-
"0.0.0.0",
|
| 39 |
-
|
| 40 |
-
"--port",
|
| 41 |
-
"7860",
|
| 42 |
-
|
| 43 |
-
"-t",
|
| 44 |
-
"4",
|
| 45 |
-
|
| 46 |
-
"-b",
|
| 47 |
-
"1024",
|
| 48 |
-
|
| 49 |
-
"-c",
|
| 50 |
-
"16384",
|
| 51 |
-
|
| 52 |
-
"-n",
|
| 53 |
-
"4096",
|
| 54 |
-
|
| 55 |
-
"--parallel",
|
| 56 |
-
"1",
|
| 57 |
-
|
| 58 |
-
"--cache-type-k",
|
| 59 |
-
"q8_0",
|
| 60 |
-
|
| 61 |
-
"--cache-type-v",
|
| 62 |
-
"q8_0"
|
| 63 |
-
]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && \
|
| 6 |
apt-get install -y --no-install-recommends \
|
| 7 |
python3 \
|
|
|
|
| 9 |
python3-venv && \
|
| 10 |
rm -rf /var/lib/apt/lists/*
|
| 11 |
|
|
|
|
| 12 |
RUN python3 -m venv /opt/venv
|
| 13 |
ENV PATH="/opt/venv/bin:${PATH}"
|
| 14 |
|
|
|
|
| 15 |
RUN pip install --no-cache-dir --upgrade pip huggingface_hub
|
| 16 |
|
| 17 |
+
RUN python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='Qwen/Qwen2.5-Coder-3B-Instruct-GGUF', filename='qwen2.5-coder-3b-instruct-q4_k_m.gguf', local_dir='/app')"
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
CMD ["--server","-m","/app/qwen2.5-coder-3b-instruct-q4_k_m.gguf","--host","0.0.0.0","--port","7860","-t","4","-b","1024","-c","16384","-n","4096","--parallel","1","--cache-type-k","q8_0","--cache-type-v","q8_0"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|