build: avoid unbounded parallel builds (#12319)

With the addition of cuda v13, on a clean setup, the level of parallelism
was causing docker desktop to become overwhelmed and compilers
were crashing.  This limits to 8 parallel per build stage, with the ability
to override if you have many more cores available.
This commit is contained in:
Daniel Hiltgen
2025-09-18 14:57:01 -07:00
committed by GitHub
parent eb0a5d4459
commit 0c3d0e7533
2 changed files with 23 additions and 14 deletions

View File

@@ -16,6 +16,7 @@ OLLAMA_COMMON_BUILD_ARGS="--build-arg=VERSION \
--build-arg=OLLAMA_FAST_BUILD \
--build-arg=CUSTOM_CPU_FLAGS \
--build-arg=GPU_RUNNER_CPU_FLAGS \
--build-arg=PARALLEL \
--build-arg=AMDGPU_TARGETS"
echo "Building Ollama"