Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +13 -10
Dockerfile
CHANGED
|
@@ -1,16 +1,19 @@
|
|
| 1 |
-
# Use the official
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
RUN apt-get update && apt-get install -y python3-pip && rm -rf /var/lib/apt/lists/*
|
| 7 |
-
RUN pip3 install --no-cache-dir huggingface_hub --break-system-packages
|
| 8 |
|
| 9 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
ENV REPO_ID="tensorblock/WhiteRabbitNeo-2.5-Qwen-2.5-Coder-7B-GGUF"
|
| 11 |
ENV FILENAME="WhiteRabbitNeo-2.5-Qwen-2.5-Coder-7B-Q4_K_M.gguf"
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
# 2. Start the pre-compiled server on HF port 7860
|
| 15 |
CMD python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='$REPO_ID', filename='$FILENAME', local_dir='.')" && \
|
| 16 |
-
|
|
|
|
| 1 |
+
# Use the official HF Python image - this NEVER fails to pull
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# Install system dependencies for runtime
|
| 5 |
+
RUN apt-get update && apt-get install -y libgomp1 wget && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
# Install PRE-COMPILED llama-cpp (skips the gcc/compiler step entirely)
|
| 8 |
+
# This wheel is specifically for CPU-based Linux like HF Spaces
|
| 9 |
+
RUN pip install --no-cache-dir \
|
| 10 |
+
https://github.com \
|
| 11 |
+
huggingface_hub llama-cpp-python[server]
|
| 12 |
+
|
| 13 |
+
# Model Details
|
| 14 |
ENV REPO_ID="tensorblock/WhiteRabbitNeo-2.5-Qwen-2.5-Coder-7B-GGUF"
|
| 15 |
ENV FILENAME="WhiteRabbitNeo-2.5-Qwen-2.5-Coder-7B-Q4_K_M.gguf"
|
| 16 |
|
| 17 |
+
# RUNTIME: Download and Start
|
|
|
|
| 18 |
CMD python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='$REPO_ID', filename='$FILENAME', local_dir='.')" && \
|
| 19 |
+
python3 -m llama_cpp.server --model ./$FILENAME --host 0.0.0.0 --port 7860 --n_ctx 1024 --n_threads 2
|