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