Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
use prebuilt llama.cpp release b10091 (qwen35moe, runtime CPU dispatch) - no compile (no OOM), no -march=native (no SIGILL)
Browse files- Dockerfile +15 -13
Dockerfile
CHANGED
|
@@ -1,20 +1,22 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 4 |
-
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
#
|
| 8 |
-
#
|
| 9 |
-
#
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
| 18 |
|
| 19 |
WORKDIR /app
|
| 20 |
COPY requirements.txt .
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
# curl brings libcurl (llama-server links it); libgomp1 for OpenMP.
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
curl ca-certificates libgomp1 && rm -rf /var/lib/apt/lists/*
|
| 6 |
|
| 7 |
+
# Prebuilt llama.cpp (CPU x64). A recent build (b10091) that registers the qwen35moe
|
| 8 |
+
# architecture POCKET uses. It ships runtime CPU-feature dispatch (libggml-cpu-*.so
|
| 9 |
+
# variants), so it's portable — no SIGILL (exit 132) — and needs no source compile,
|
| 10 |
+
# so there is no OOM (exit 137) during the build.
|
| 11 |
+
ARG LLAMA_TAG=b10091
|
| 12 |
+
RUN curl -fsSL -o /tmp/llama.tgz \
|
| 13 |
+
"https://github.com/ggml-org/llama.cpp/releases/download/${LLAMA_TAG}/llama-${LLAMA_TAG}-bin-ubuntu-x64.tar.gz" && \
|
| 14 |
+
mkdir -p /opt/llama && tar xzf /tmp/llama.tgz -C /opt/llama && rm /tmp/llama.tgz && \
|
| 15 |
+
ln -s "/opt/llama/llama-${LLAMA_TAG}" /opt/llama/bin && \
|
| 16 |
+
/opt/llama/bin/llama-server --version 2>&1 | head -3 || true
|
| 17 |
+
|
| 18 |
+
ENV LD_LIBRARY_PATH=/opt/llama/bin \
|
| 19 |
+
PATH="/opt/llama/bin:${PATH}"
|
| 20 |
|
| 21 |
WORKDIR /app
|
| 22 |
COPY requirements.txt .
|