CooLLaMACEO commited on
Commit
9a444d0
·
verified ·
1 Parent(s): 494bc63

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -1,20 +1,20 @@
1
- # Base image
2
- FROM python:3.11-slim
3
 
4
  WORKDIR /app
5
 
6
- # Install wget (needed for the model)
7
  RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
8
 
9
- # 1. Install PREBUILT llama-cpp-python directly via URL
10
- # This specific wheel is for Linux x86_64 and Python 3.11
11
  RUN pip install --no-cache-dir \
12
- https://github.com/abetlen/llama-cpp-python/releases/download/v0.3.16/llama_cpp_python-0.3.16-cp311-cp311-manylinux_2_17_x86_64.whl
13
 
14
  # 2. Install web dependencies
15
  RUN pip install --no-cache-dir fastapi uvicorn[standard] requests
16
 
17
- # 3. Setup models directory and download GPT-OSS-20B
18
  RUN mkdir -p ./models
19
  RUN wget -q -O ./models/gpt-oss-20b-Q3_K_M.gguf \
20
  https://huggingface.co/unsloth/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-Q3_K_M.gguf
 
1
+ # We switch to 3.10 to match the most stable community prebuilt wheels
2
+ FROM python:3.10-slim
3
 
4
  WORKDIR /app
5
 
6
+ # Install system essentials
7
  RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
8
 
9
+ # 1. Install PREBUILT llama-cpp-python (Community HF Space version)
10
+ # This wheel is optimized for the HF Free Tier (16GB RAM)
11
  RUN pip install --no-cache-dir \
12
+ https://huggingface.co/Luigi/llama-cpp-python-wheels-hf-spaces-free-cpu/resolve/main/llama_cpp_python-0.3.22-cp310-cp310-linux_x86_64.whl
13
 
14
  # 2. Install web dependencies
15
  RUN pip install --no-cache-dir fastapi uvicorn[standard] requests
16
 
17
+ # 3. Setup models folder and download GPT-OSS-20B
18
  RUN mkdir -p ./models
19
  RUN wget -q -O ./models/gpt-oss-20b-Q3_K_M.gguf \
20
  https://huggingface.co/unsloth/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-Q3_K_M.gguf