Replies: 2 comments 1 reply
|
I meet this problem and find a solution.
FROM ghcr.io/ggml-org/llama.cpp:server-vulkan
RUN apt-get update && apt-get install -y --no-install-recommends libglvnd0 libgl1 libglx0 libegl1 libgles2 && rm -rf /var/lib/apt/lists/*(saved as
outputs Story:When |
|
Hey @git2212, @EnderHane, @VVakko, and team, Had the same problem and these holidays I finally had some time to investigate it properly. Found this discussion and @EnderHane, you nailed it - the missing libglvnd libraries are indeed the culprit. I did some deeper analysis to understand why: Mesa Vulkan drivers need libglvnd to initialize the EGL display subsystem and communicate with DRI devices ( I've submitted a PR with the fix: #18664 (tracking in issue #17761) Tests performed:
Before (original Dockerfile): After (with fix): Thanks for documenting this so well - saved me a lot of time. If anyone has additional tests they'd like me to run, please let me know. Cheers |
Uh oh!
There was an error while loading. Please reload this page.
My starting assumption is that I missed something although I tried following the instructions for compiling Vulkan support for a docker image at https://github.com/ggml-org/llama.cpp/blob/master/docs/build.md#for-docker-users.
Image compiles and the container runs using:
docker run -d --name llama-cpp-tmp -p 8010:8080 -v "/mnt/ai-models-llama:/models" --rm -ti --device /dev/dri/renderD128:/dev/dri/renderD128 --device /dev/dri/renderD129:/dev/dri/renderD129 llama-cpp-vulkan:b6503 ...... but it loads everything onto the CPU...
running the command inside the docker container llama-server --list-devices returns
rather odd considering that on the host vulkaninfo reports multiple gpus and ls -la /dev/dri:
crw-rw---- 1 nobody nogroup 226, 128 Sep 20 00:37 renderD128
crw-rw---- 1 nobody nogroup 226, 129 Sep 20 00:37 renderD129
crw-rw---- 1 nobody nogroup 226, 130 Sep 20 00:37 renderD130
crw-rw---- 1 nobody nogroup 226, 131 Sep 20 00:37 renderD131
crw-rw---- 1 nobody nogroup 226, 132 Sep 20 00:37 renderD132
crw-rw---- 1 nobody nogroup 226, 133 Sep 20 00:37 renderD133
ls -la /dev/dri inside the docker container reports:
which matches the two devices the container was started with...
The host has libvulkan1, mesa-vulkan-drivers, vulkan-tools, mesa-utils installed, as well as cuda-toolkit for docker... this host works fine with CUDA based llama.cpp container... ?!?
the host's uname -a :
Linux gpu-lxc-vllm-1 6.8.12-15-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-15 (2025-09-12T11:02Z) x86_64 GNU/LinuxAny suggestions are welcome.
All reactions