[PR #12319] [MERGED] build: avoid unbounded parallel builds #13783

Closed
opened 2026-04-13 00:36:24 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12319
Author: @dhiltgen
Created: 9/17/2025
Status: Merged
Merged: 9/18/2025
Merged by: @dhiltgen

Base: mainHead: docker


📝 Commits (1)

  • 9dae84a build: avoid unbounded parallel builds

📊 Changes

2 files changed (+23 additions, -14 deletions)

View changed files

📝 Dockerfile (+22 -14)
📝 scripts/env.sh (+1 -0)

📄 Description

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.

Tested with:

  • PARALLEL=2 ./scripts/build_linux.sh - low system load
  • PARALLEL=8 ./scripts/build_linux.sh - same load as unspecified PARALLEL
  • PARALLEL=99 ./scripts/build_linux.sh - Same behavior as before this PR - system thrashing, leading to crashed compiles

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/12319 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 9/17/2025 **Status:** ✅ Merged **Merged:** 9/18/2025 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `docker` --- ### 📝 Commits (1) - [`9dae84a`](https://github.com/ollama/ollama/commit/9dae84a07e71f44ad4cdedb8e8485e0ffb375576) build: avoid unbounded parallel builds ### 📊 Changes **2 files changed** (+23 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+22 -14) 📝 `scripts/env.sh` (+1 -0) </details> ### 📄 Description 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. Tested with: - `PARALLEL=2 ./scripts/build_linux.sh` - low system load - `PARALLEL=8 ./scripts/build_linux.sh` - same load as unspecified PARALLEL - `PARALLEL=99 ./scripts/build_linux.sh` - Same behavior as before this PR - system thrashing, leading to crashed compiles --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 00:36:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13783