Add .deb packaging for Ubuntu releases#84
Conversation
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>
There was a problem hiding this comment.
💡 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".
| 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 |
There was a problem hiding this comment.
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 👍 / 👎.
|
@superm1 Thoughts about this PR? |
| # 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 |
There was a problem hiding this comment.
/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.
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.
There was a problem hiding this comment.
Yes, I agree that path that you are taking where we are not bundling ROCm everywhere is the right path forward as ROCm matures.
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:
Key details: