Spaces:
Runtime error
Runtime error
Cap llama.cpp build parallelism to avoid OOM on HF Spaces builder
Browse filesBare `-j` used all cores; parallel g++ on ggml kernels blew past the
cpu-basic build RAM limit (exit 137 OOMKilled). `-j 2` keeps it bounded.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Dockerfile +1 -1
Dockerfile
CHANGED
|
@@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 12 |
RUN git clone --depth 1 https://github.com/ggml-org/llama.cpp /opt/llama.cpp \
|
| 13 |
&& cmake -S /opt/llama.cpp -B /opt/llama.cpp/build \
|
| 14 |
-DGGML_NATIVE=OFF -DLLAMA_CURL=OFF -DLLAMA_BUILD_TESTS=OFF \
|
| 15 |
-
&& cmake --build /opt/llama.cpp/build --config Release -j --target llama-server \
|
| 16 |
&& rm -rf /opt/llama.cpp/.git
|
| 17 |
|
| 18 |
# --- non-root user (Hugging Face Spaces convention) --------------------------
|
|
|
|
| 12 |
RUN git clone --depth 1 https://github.com/ggml-org/llama.cpp /opt/llama.cpp \
|
| 13 |
&& cmake -S /opt/llama.cpp -B /opt/llama.cpp/build \
|
| 14 |
-DGGML_NATIVE=OFF -DLLAMA_CURL=OFF -DLLAMA_BUILD_TESTS=OFF \
|
| 15 |
+
&& cmake --build /opt/llama.cpp/build --config Release -j 2 --target llama-server \
|
| 16 |
&& rm -rf /opt/llama.cpp/.git
|
| 17 |
|
| 18 |
# --- non-root user (Hugging Face Spaces convention) --------------------------
|