[PR #5582] [CLOSED] Remove nested runner payloads from linux #11836

Closed
opened 2026-04-12 23:40:18 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/5582
Author: @dhiltgen
Created: 7/9/2024
Status: Closed

Base: mainHead: no_linux_payloads


📝 Commits (1)

  • a043647 Remove nested runner payloads from linux

📊 Changes

11 files changed (+114 additions, -106 deletions)

View changed files

📝 Dockerfile (+15 -19)
📝 envconfig/config.go (+4 -4)
📝 gpu/assets.go (+26 -24)
📝 gpu/gpu.go (+4 -4)
📝 llm/generate/gen_common.sh (+14 -1)
📝 llm/generate/gen_linux.sh (+34 -42)
📝 llm/llm_linux.go (+1 -1)
📝 llm/payload.go (+1 -1)
📝 llm/server.go (+1 -1)
📝 scripts/build_linux.sh (+4 -6)
📝 scripts/install.sh (+10 -3)

📄 Description

This adjusts linux to follow the same model we use for windows with a discrete archive (zip/tgz) to cary the primary executable, subprocess runners, and dependent libraries.

Darwin retain the payload model where the go binary is fully self contained.

Marking draft as it still needs some more testing and CI will need adjusting, but initial happy path looks good.

For comparison, the current (v0.2.1) artifacts are:

  • ollama-linux-amd64 - 467 MB
  • ollama-linux-amd64-rocm.tgz - 1.14 GB

With this PR:

% ls -lh ./dist/ollama-linux-amd64.tgz
-rw-r--r--  1 daniel  staff   1.1G Jul  9 13:19 ./dist/ollama-linux-amd64.tgz

After extracting on a system:

% ls -F
cuda/  ollama*  ollama_runners/  rocm/
% du -sh .
4.6G	.

Note: I opted to include rocm into the single artifact, since we do the same on Windows, and that simplifies the overall logic. That said, it's the brunt of the extracted size so this may be an area worth optimizing. One option might be to simply exclude the rocm directory during the extract in the install script if no AMD GPUs are detected.

% du -sh rocm
3.6G	rocm

🔄 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/5582 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 7/9/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `no_linux_payloads` --- ### 📝 Commits (1) - [`a043647`](https://github.com/ollama/ollama/commit/a043647bb7cb8a7e08c6965b433eef09d5f7d47d) Remove nested runner payloads from linux ### 📊 Changes **11 files changed** (+114 additions, -106 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+15 -19) 📝 `envconfig/config.go` (+4 -4) 📝 `gpu/assets.go` (+26 -24) 📝 `gpu/gpu.go` (+4 -4) 📝 `llm/generate/gen_common.sh` (+14 -1) 📝 `llm/generate/gen_linux.sh` (+34 -42) 📝 `llm/llm_linux.go` (+1 -1) 📝 `llm/payload.go` (+1 -1) 📝 `llm/server.go` (+1 -1) 📝 `scripts/build_linux.sh` (+4 -6) 📝 `scripts/install.sh` (+10 -3) </details> ### 📄 Description This adjusts linux to follow the same model we use for windows with a discrete archive (zip/tgz) to cary the primary executable, subprocess runners, and dependent libraries. Darwin retain the payload model where the go binary is fully self contained. Marking draft as it still needs some more testing and CI will need adjusting, but initial happy path looks good. For comparison, the current (v0.2.1) artifacts are: - `ollama-linux-amd64` - 467 MB - `ollama-linux-amd64-rocm.tgz` - 1.14 GB With this PR: ``` % ls -lh ./dist/ollama-linux-amd64.tgz -rw-r--r-- 1 daniel staff 1.1G Jul 9 13:19 ./dist/ollama-linux-amd64.tgz ``` After extracting on a system: ``` % ls -F cuda/ ollama* ollama_runners/ rocm/ % du -sh . 4.6G . ``` Note: I opted to include rocm into the single artifact, since we do the same on Windows, and that simplifies the overall logic. That said, it's the brunt of the extracted size so this may be an area worth optimizing. One option might be to simply exclude the rocm directory during the extract in the install script if no AMD GPUs are detected. ``` % du -sh rocm 3.6G rocm ``` --- <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-12 23:40:18 -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#11836