CooLLaMACEO commited on
Commit
3718e07
·
verified ·
1 Parent(s): 6d3e662

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -16
Dockerfile CHANGED
@@ -1,30 +1,25 @@
1
- # Base image with Python
2
  FROM python:3.11-slim
3
 
4
  WORKDIR /app
5
 
6
- # Install system dependencies + Build tools for llama-cpp
7
- RUN apt-get update && apt-get install -y \
8
- wget \
9
- gcc \
10
- g++ \
11
- make \
12
- cmake \
13
- && rm -rf /var/lib/apt/lists/*
14
 
15
- # Install Python dependencies
16
- RUN pip install --no-cache-dir llama-cpp-python fastapi uvicorn[standard] requests
 
 
17
 
18
- # Create models folder
19
- RUN mkdir -p ./models
20
 
21
- # Download GPT-OSS-20B model (The brain you chose!)
 
22
  RUN wget -q -O ./models/gpt-oss-20b-Q3_K_M.gguf \
23
  https://huggingface.co/unsloth/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-Q3_K_M.gguf
24
 
25
- # Copy your app code
26
  COPY app.py ./app.py
27
 
28
  EXPOSE 8000
29
-
30
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
 
1
+ # Base image
2
  FROM python:3.11-slim
3
 
4
  WORKDIR /app
5
 
6
+ # We still need wget for the model, but we can skip the heavy compilers!
7
+ RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
8
 
9
+ # 1. Install pre-built llama-cpp-python (CPU version)
10
+ # This bypasses the "Building wheel..." stage entirely
11
+ RUN pip install llama-cpp-python \
12
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
13
 
14
+ # 2. Install your other web tools
15
+ RUN pip install --no-cache-dir fastapi uvicorn[standard] requests
16
 
17
+ # 3. Setup models
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
21
 
 
22
  COPY app.py ./app.py
23
 
24
  EXPOSE 8000
 
25
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]