[PR #130] [CLOSED] Fix Vulkan and CPU support for local llama.cpp #4476

Closed
opened 2026-10-22 04:07:58 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/130
Author: @underslunghero
Created: 4/20/2026
Status: ❌ Closed

Base: main ← Head: fix/upstream-129


📝 Commits (1)

  • eb98c41 Fix Vulkan and CPU support for local llama.cpp

📊 Changes

2 files changed (+19 additions, -7 deletions)

View changed files

📝 Dockerfile (+7 -0)
📝 packages/server/src/services/sidecar/sidecar-process.service.ts (+12 -7)

📄 Description

This pull request resolves issues in which the sidecar would not come up in the Docker container. Fixes #129

⚠️ First contribution ⚠️

  • Tried to make sure I didn't cause any issues or fires.
  • Followed the contributor guidelines.
  • Tried to avoid regressions, even in fixing regressions.

Tests Performed

  • Ran locally in Vulkan mode.
  • Ran containerized in CPU mode.
  • Ran containerized in Vulkan mode.

Tests Not Performed, and Mitigations

  • Didn't test CUDA. The SidecarRuntimeService can't get a Linux CUDA build, because there isn't one.
    • The CUDA builds are Windows only.
    • For Linux, you're supposed to build your own. I didn't want to burden this project with that. For Nvidia/Linux users, Vulkan works well enough.
    • I don't have a Windows PC with a CUDA GPU.
    • Tried to ensure that the Gemma fix was scoped to CUDA where it was intended.
    • Left in the code that adds a Linux CUDA build to the list of builds to try, in case it ever comes back.

Add required dependencies for sidecar to Dockerfile

I hesitated to add dependencies to your remarkably clean Dockerfile, but CPU and Vulkan support cover a lot of ground. Hopefully you feel it's worthwhile.

  1. Missing libssl3 prevented llama-server from launching.
  2. libgomp1 is required to run llama-server in CPU mode.
  3. libvulkan1 is the minimum needed to get Vulkan support working in the container.

Fix crashes in CPU mode

  1. In CPU mode, previously only the 999 GPU layers mode was added. Separated the GPU/CPU cases and clarified the labels.
  2. The new -sm none fix for Gemma 4 on multi-GPUs was forcing GPU detection even in llama.cpp builds that didn't support it, causing the server to exit immediately. Limited to CUDA runtimes.

Interactions with other PRs

https://github.com/Pasta-Devs/Marinara-Engine/pull/122 is a more comprehensive rework of this area. However, I think the "Windows Gemma fix" it preserves is a CUDA fix (since the llama.cpp CUDA binary is only available for Windows). Therefore I think the -sm none fix here needs to be applied there if this request is not merged.

The container dependency fixes would still apply.

If you want to apply both 122 and this, I'd suggest applying this either to main first, or rebasing MuniMuni's change on top of this and preserving the -sm none change in the result.


🔄 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/Pasta-Devs/Marinara-Engine/pull/130 **Author:** [@underslunghero](https://github.com/underslunghero) **Created:** 4/20/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/upstream-129` --- ### 📝 Commits (1) - [`eb98c41`](https://github.com/Pasta-Devs/Marinara-Engine/commit/eb98c415b198359958734b99b57b05b1e7bd96b4) Fix Vulkan and CPU support for local llama.cpp ### 📊 Changes **2 files changed** (+19 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+7 -0) 📝 `packages/server/src/services/sidecar/sidecar-process.service.ts` (+12 -7) </details> ### 📄 Description This pull request resolves issues in which the sidecar would not come up in the Docker container. Fixes #129 ⚠️ First contribution ⚠️ - Tried to make sure I didn't cause any issues or fires. - Followed the contributor guidelines. - Tried to avoid regressions, even in fixing regressions. ## Tests Performed - Ran locally in Vulkan mode. - Ran containerized in CPU mode. - Ran containerized in Vulkan mode. ## Tests Not Performed, and Mitigations - Didn't test CUDA. The SidecarRuntimeService can't get a Linux CUDA build, because there isn't one. - The CUDA builds are Windows only. - For Linux, you're supposed to build your own. I didn't want to burden this project with that. For Nvidia/Linux users, Vulkan works well enough. - I don't have a Windows PC with a CUDA GPU. - Tried to ensure that the Gemma fix was scoped to CUDA where it was intended. - Left in the code that adds a Linux CUDA build to the list of builds to try, in case it ever comes back. ## Add required dependencies for sidecar to Dockerfile I hesitated to add dependencies to your remarkably clean Dockerfile, but CPU and Vulkan support cover a lot of ground. Hopefully you feel it's worthwhile. 1. Missing `libssl3` prevented `llama-server` from launching. 2. `libgomp1` is required to run `llama-server` in CPU mode. 3. `libvulkan1` is the minimum needed to get Vulkan support working in the container. ## Fix crashes in CPU mode 1. In CPU mode, previously only the 999 GPU layers mode was added. Separated the GPU/CPU cases and clarified the labels. 2. The new `-sm none` fix for Gemma 4 on multi-GPUs was forcing GPU detection even in llama.cpp builds that didn't support it, causing the server to exit immediately. Limited to CUDA runtimes. ## Interactions with other PRs https://github.com/Pasta-Devs/Marinara-Engine/pull/122 is a more comprehensive rework of this area. However, I think the "Windows Gemma fix" it preserves is a CUDA fix (since the llama.cpp CUDA binary is only available for Windows). Therefore I think the `-sm none` fix here needs to be applied there if this request is not merged. The container dependency fixes would still apply. If you want to apply both 122 and this, I'd suggest applying this either to `main` first, or rebasing MuniMuni's change on top of this and preserving the `-sm none` change in the result. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:07:58 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4476
No description provided.