fomext commited on
Commit
7e229ed
Β·
verified Β·
1 Parent(s): 36a3b55

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +7 -10
  2. requirements.txt +5 -3
Dockerfile CHANGED
@@ -14,18 +14,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
14
 
15
  WORKDIR /app
16
 
17
- # ── Python deps ──────────────────────────────────────────────
18
- RUN pip install --no-cache-dir \
19
- fastapi==0.111.0 \
20
- "uvicorn[standard]==0.29.0" \
21
- pydantic==2.7.1
22
-
23
- # Install llama-cpp-python CPU-only (compiled from source)
24
- # 0.3.4: new enough to read current GGUF format, avoids the
25
- # malloc/GGML_ASSERT corruption crash introduced in 0.3.9
26
  RUN CMAKE_ARGS="-DGGML_CUDA=OFF -DGGML_METAL=OFF -DGGML_OPENCL=OFF" \
27
  FORCE_CMAKE=1 \
28
- pip install --no-cache-dir llama-cpp-python==0.3.4
29
 
30
  # ── App code ─────────────────────────────────────────────────
31
  COPY app.py .
 
14
 
15
  WORKDIR /app
16
 
17
+ COPY requirements.txt .
18
+
19
+ # ── Python deps (single source of truth: requirements.txt) ───
20
+ # CMAKE_ARGS/FORCE_CMAKE apply to the whole install so llama-cpp-python
21
+ # gets built from source as CPU-only; the other packages are unaffected.
22
+ # See requirements.txt for why the llama-cpp-python version matters.
 
 
 
23
  RUN CMAKE_ARGS="-DGGML_CUDA=OFF -DGGML_METAL=OFF -DGGML_OPENCL=OFF" \
24
  FORCE_CMAKE=1 \
25
+ pip install --no-cache-dir -r requirements.txt
26
 
27
  # ── App code ─────────────────────────────────────────────────
28
  COPY app.py .
requirements.txt CHANGED
@@ -1,6 +1,8 @@
1
  fastapi==0.111.0
2
  uvicorn[standard]==0.29.0
3
  pydantic==2.7.1
4
- # llama-cpp-python is installed via pip in the Dockerfile
5
- # with CPU-only build flags (no CUDA / Metal)
6
- llama-cpp-python==0.3.9
 
 
 
1
  fastapi==0.111.0
2
  uvicorn[standard]==0.29.0
3
  pydantic==2.7.1
4
+ # Must be >=0.3.9 -- that's the release that added Qwen3 architecture
5
+ # support to llama.cpp. Anything older will fail to load a Qwen3 GGUF
6
+ # with "Failed to load model from file".
7
+ # Built from source by the Dockerfile with CPU-only CMAKE_ARGS (no CUDA / Metal).
8
+ llama-cpp-python==0.3.30