Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -10
Dockerfile
CHANGED
|
@@ -3,17 +3,17 @@ FROM python:3.10-slim
|
|
| 3 |
# Install system dependencies
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
build-essential \
|
| 6 |
-
|
| 7 |
-
|
| 8 |
|
| 9 |
-
# Install llama-cpp-python with server extra
|
| 10 |
-
RUN pip install --
|
| 11 |
|
| 12 |
-
# Download the model (Qwen 2.5 7B Instruct Quantized)
|
| 13 |
-
RUN wget https://huggingface.co/Qwen/Qwen2.5-7B-Instruct-GGUF/resolve/main/qwen2.5-7b-instruct-q4_k_m.gguf -O model.gguf
|
| 14 |
|
| 15 |
-
# Expose the HF Space port
|
| 16 |
-
EXPOSE 7860
|
| 17 |
|
| 18 |
-
# Run the OpenAI-compatible server
|
| 19 |
-
CMD ["python3", "-m", "llama_cpp.server", "--model", "model.gguf", "--host", "0.0.0.0", "--port", "7860", "--n_ctx", "4096"]
|
|
|
|
| 3 |
# Install system dependencies
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
build-essential \
|
| 6 |
+
wget \
|
| 7 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
+
# Install llama-cpp-python with server extra using pre-built wheels to avoid timeout
|
| 10 |
+
RUN pip install llama-cpp-python[server] --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 11 |
|
| 12 |
+
# Download the model (Qwen 2.5 7B Instruct Quantized)
|
| 13 |
+
RUN wget https://huggingface.co/Qwen/Qwen2.5-7B-Instruct-GGUF/resolve/main/qwen2.5-7b-instruct-q4_k_m.gguf -O model.gguf
|
| 14 |
|
| 15 |
+
# Expose the HF Space port
|
| 16 |
+
EXPOSE 7860
|
| 17 |
|
| 18 |
+
# Run the OpenAI-compatible server
|
| 19 |
+
CMD ["python3", "-m", "llama_cpp.server", "--model", "model.gguf", "--host", "0.0.0.0", "--port", "7860", "--n_ctx", "4096"]
|