tusarway commited on
Commit
3f5a18f
Β·
verified Β·
1 Parent(s): b72e18c
Files changed (1) hide show
  1. Dockerfile +3 -9
Dockerfile CHANGED
@@ -2,29 +2,23 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # Build tools required β€” no pre-built CPU wheels exist for llama-cpp-python >= 0.3.x
6
- # (abetlen's /whl/cpu index only has older versions)
7
  RUN apt-get update && apt-get install -y \
8
  build-essential \
9
  cmake \
10
  libopenblas-dev \
 
 
11
  curl \
12
  wget \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Install all non-compiled deps first (fast, cached separately)
16
  COPY requirements.txt .
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
- # ── Compile llama-cpp-python from source ──────────────────────────────────────
20
- # CMAKE_BUILD_PARALLEL_LEVEL=4 β†’ use all available build cores (~4x faster)
21
- # GGML_BLAS=ON β†’ link OpenBLAS for faster matrix ops on CPU
22
- # This layer is Docker-cached: only re-runs if requirements change
23
  RUN CMAKE_BUILD_PARALLEL_LEVEL=4 \
24
- CMAKE_ARGS="-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DCMAKE_BUILD_TYPE=Release" \
25
  pip install --no-cache-dir "llama-cpp-python==0.3.8"
26
 
27
- # Download model at build time (cached separately from compilation)
28
  RUN mkdir -p /app/models && \
29
  wget --progress=dot:giga \
30
  "https://huggingface.co/unsloth/gemma-4-26B-A4B-it-GGUF/resolve/main/gemma-4-26B-A4B-it-UD-IQ3_XXS.gguf" \
 
2
 
3
  WORKDIR /app
4
 
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  cmake \
8
  libopenblas-dev \
9
+ pkg-config \
10
+ git \
11
  curl \
12
  wget \
13
  && rm -rf /var/lib/apt/lists/*
14
 
 
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
 
 
 
 
18
  RUN CMAKE_BUILD_PARALLEL_LEVEL=4 \
19
+ CMAKE_ARGS="-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS" \
20
  pip install --no-cache-dir "llama-cpp-python==0.3.8"
21
 
 
22
  RUN mkdir -p /app/models && \
23
  wget --progress=dot:giga \
24
  "https://huggingface.co/unsloth/gemma-4-26B-A4B-it-GGUF/resolve/main/gemma-4-26B-A4B-it-UD-IQ3_XXS.gguf" \