Skip to content

Add .deb packaging for Ubuntu releases#84

Open
paulstuart wants to merge 1 commit into
lemonade-sdk:mainfrom
paulstuart:feature/deb-packaging
Open

Add .deb packaging for Ubuntu releases#84
paulstuart wants to merge 1 commit into
lemonade-sdk:mainfrom
paulstuart:feature/deb-packaging

Conversation

@paulstuart

Copy link
Copy Markdown

Adds scripts/create_deb.sh and integrates it into the CI build pipeline so each Ubuntu release automatically produces an installable .deb package.

Package layout:

  • Executables → /usr/bin/ (llama-server, llama-cli, etc.)
  • Bundled ROCm libraries → /usr/lib/llamacpp-rocm/ (RPATH re-patched)
  • GPU kernel data → /usr/lib/llamacpp-rocm/rocblas/ and hipblaslt/

Key details:

  • Library soname duplicates are replaced with proper symlinks (~40% size reduction vs zip)
  • RPATH re-patched from $ORIGIN to /usr/lib/llamacpp-rocm for correct install-time resolution
  • Per-GPU-target packages (llamacpp-rocm-gfx1151, etc.) with Provides/Conflicts on the virtual "llamacpp-rocm" package so only one GPU variant is active at a time
  • New build-deb CI job validates packaging on every PR
  • create-release job builds final versioned .debs and attaches them to GitHub releases
  • Release notes include dpkg install instructions

Adds scripts/create_deb.sh and integrates it into the CI build pipeline
so each Ubuntu release automatically produces an installable .deb package.

Package layout:
- Executables → /usr/bin/ (llama-server, llama-cli, etc.)
- Bundled ROCm libraries → /usr/lib/llamacpp-rocm/ (RPATH re-patched)
- GPU kernel data → /usr/lib/llamacpp-rocm/rocblas/ and hipblaslt/

Key details:
- Library soname duplicates are replaced with proper symlinks (~40% size reduction vs zip)
- RPATH re-patched from $ORIGIN to /usr/lib/llamacpp-rocm for correct install-time resolution
- Per-GPU-target packages (llamacpp-rocm-gfx1151, etc.) with Provides/Conflicts
  on the virtual "llamacpp-rocm" package so only one GPU variant is active at a time
- New build-deb CI job validates packaging on every PR
- create-release job builds final versioned .debs and attaches them to GitHub releases
- Release notes include dpkg install instructions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d8d6a9d64e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1184 to +1185
wget https://github.com/lemonade-sdk/llamacpp-rocm/releases/download/${TAG}/llamacpp-rocm-gfx1151_${TAG}_amd64.deb
sudo dpkg -i llamacpp-rocm-gfx1151_${TAG}_amd64.deb

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fix .deb filename in release install snippet

The release notes command uses llamacpp-rocm-gfx1151_${TAG}_amd64.deb, but scripts/create_deb.sh rewrites non-numeric versions like b1234 to 0~b1234 before building, so uploaded assets are named ..._0~${TAG}_amd64.deb. As written, the documented wget/dpkg -i lines point to a non-existent file for every normal release tag and will fail for users following the instructions.

Useful? React with 👍 / 👎.

@danielholanda

Copy link
Copy Markdown
Contributor

@superm1 Thoughts about this PR?

Comment thread scripts/create_deb.sh
Comment on lines +15 to +19
# Installed layout:
# /usr/bin/ — llama-* executables and rpc-server
# /usr/lib/llamacpp-rocm/ — shared libraries (RPATH re-patched)
# /usr/lib/llamacpp-rocm/rocblas/ — rocBLAS GPU kernels
# /usr/lib/llamacpp-rocm/hipblaslt/ — hipBLASLt GPU kernels

@superm1 superm1 May 19, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/usr/lib is normally for distro packages, /usr/local/lib is for locally installed packages, and /opt/ is for "vendor" packages. I think in this case /opt is more appropriate.

But I do agree that you need to avoid clashing with the paths from AMD's rocm debian packages.

https://rocm.docs.amd.com/en/7.13.0-preview/install/rocm.html?fam=ryzen&gpu=max-pro-395&os=ubuntu&os-version=24.04&i=pkgman&ubuntu-ver=26.04&w=compute&gfx=gfx1151

And then with that being said - I have a fundamental question. Why bundle ROCm at all? Why not just a Debian package that depends upon content from AMD's wheel or AMD's debian package?

Seems like a lot of wasted space to bundle it all together.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree that path that you are taking where we are not bundling ROCm everywhere is the right path forward as ROCm matures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants