Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -7,9 +7,12 @@ RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
|
|
| 7 |
# Set working directory
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
-
#
|
|
|
|
| 11 |
RUN pip install --no-cache-dir \
|
| 12 |
-
|
|
|
|
|
|
|
| 13 |
|
| 14 |
# Download the Qwen 2.5 Coder GGUF model
|
| 15 |
RUN wget https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct-GGUF/resolve/main/qwen2.5-coder-7b-instruct-q4_k_m.gguf
|
|
@@ -18,8 +21,6 @@ RUN wget https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct-GGUF/resolve/main
|
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
# Run the server
|
| 21 |
-
# --n_threads 2 (HF Free tier has 2 vCPUs)
|
| 22 |
-
# --host 0.0.0.0 --port 7860 (Required for HF)
|
| 23 |
CMD ["python3", "-m", "llama_cpp.server", \
|
| 24 |
"--model", "qwen2.5-coder-7b-instruct-q4_k_m.gguf", \
|
| 25 |
"--host", "0.0.0.0", \
|
|
|
|
| 7 |
# Set working directory
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
+
# --- REPLACED SECTION START ---
|
| 11 |
+
# Install llama-cpp-python[server] from the official CPU wheel index
|
| 12 |
RUN pip install --no-cache-dir \
|
| 13 |
+
llama-cpp-python[server] \
|
| 14 |
+
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 15 |
+
# --- REPLACED SECTION END ---
|
| 16 |
|
| 17 |
# Download the Qwen 2.5 Coder GGUF model
|
| 18 |
RUN wget https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct-GGUF/resolve/main/qwen2.5-coder-7b-instruct-q4_k_m.gguf
|
|
|
|
| 21 |
EXPOSE 7860
|
| 22 |
|
| 23 |
# Run the server
|
|
|
|
|
|
|
| 24 |
CMD ["python3", "-m", "llama_cpp.server", \
|
| 25 |
"--model", "qwen2.5-coder-7b-instruct-q4_k_m.gguf", \
|
| 26 |
"--host", "0.0.0.0", \
|