Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- Dockerfile +7 -10
- 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 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 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
|
| 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 |
-
#
|
| 5 |
-
#
|
| 6 |
-
|
|
|
|
|
|
|
|
|
| 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
|