4n0s commited on
Commit
9745aca
·
verified ·
1 Parent(s): b041a69

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -10
Dockerfile CHANGED
@@ -1,20 +1,13 @@
1
- # 1. Use the official Python image (No 'not found' errors)
2
  FROM python:3.10-slim
3
 
4
- # 2. Install system tools for runtime (No 'gcc' needed)
5
  RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
6
 
7
- # 3. Install PRE-COMPILED llama-cpp-python (Skips build phase/timeout)
8
- # This link is a verified wheel for HF Spaces CPU
9
- RUN pip install --no-cache-dir \
10
- https://huggingface.co \
11
- huggingface_hub
12
 
13
- # 4. Model details - Verified Filename
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-Q2_K.gguf"
16
 
17
- # 5. RUNTIME: Download and Start Server
18
- # Using Q2_K and n_ctx 1024 to fit in 16GB Free RAM
19
  CMD python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='$REPO_ID', filename='$FILENAME', local_dir='.')" && \
20
  python3 -m llama_cpp.server --model ./$FILENAME --host 0.0.0.0 --port 7860 --n_ctx 1024 --n_threads 2
 
 
1
  FROM python:3.10-slim
2
 
 
3
  RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
4
 
5
+ # All-in-one install to prevent URL cutting
6
+ RUN pip install --no-cache-dir huggingface_hub llama-cpp-python[server] --extra-index-url https://abetlen.github.io
 
 
 
7
 
 
8
  ENV REPO_ID="tensorblock/WhiteRabbitNeo-2.5-Qwen-2.5-Coder-7B-GGUF"
9
  ENV FILENAME="WhiteRabbitNeo-2.5-Qwen-2.5-Coder-7B-Q2_K.gguf"
10
 
11
+ # Download at runtime (No build timeout) and Start
 
12
  CMD python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='$REPO_ID', filename='$FILENAME', local_dir='.')" && \
13
  python3 -m llama_cpp.server --model ./$FILENAME --host 0.0.0.0 --port 7860 --n_ctx 1024 --n_threads 2