I can't seem to get the NVIDIA GPU passed through to a vulkan only container. I'm trying to pass both my nvidia GPU (NVIDIA RTX 2060S) and my Intel GPU (Arc a770 16GB) directly to a llama.cpp container with vulkan backend. I'm missing things that would let me inject the vulkan deps into the container. I have uninstalled and reinstalled the most recent version of the NVIDIA driver. Some commands and outpu:
root@Tower:~# lspci | grep -i "vga"
0a:00.0 VGA compatible controller: Intel Corporation DG2 [Arc A770] (rev 08)
0c:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060 SUPER] (rev a1)
root@Tower:~# ls /usr/share/vulkan/icd.d
ls /usr/share/vulkan/implicit_layer.d
ls /etc/cdi
intel_hasvk_icd.x86_64.json lvp_icd.x86_64.json radeon_icd.x86_64.json
intel_icd.x86_64.json nouveau_icd.x86_64.json virtio_icd.x86_64.json
VkLayer_MESA_device_select.json
nvidia.yaml
root@Tower:~# ls -la /dev/dri
total 0
drwxrwxrwx 3 root root 140 Jun 24 09:51 ./
drwxr-xr-x 18 root root 4880 Jun 24 09:55 ../
drwxrwxrwx 2 root root 120 Jun 24 09:51 by-path/
crwxrwxrwx 1 root video 226, 0 Jun 24 09:51 card0
crwxrwxrwx 1 root video 226, 1 Jun 24 09:51 card1
crwxrwxrwx 1 root video 226, 128 Jun 24 09:51 renderD128
crwxrwxrwx 1 root video 226, 129 Jun 24 09:51 renderD129Help would be appreciated!
I'm quite confused because I have used steam-headless on the NVIDIA GPU before (a while ago) and it was able to use steam proton which is a vulkan application. Now when I try to run something like:
root@Tower:~# docker run --rm -it \
--device nvidia.com/gpu=all \
-e NVIDIA_DRIVER_CAPABILITIES=all \
ubuntu:24.04 \
bash -c "apt-get update && apt-get install -y vulkan-tools && vulkaninfo --summary"
--------- truncated apt output ----------
ERROR: [Loader Message] Code 0 : libXext.so.6: cannot open shared object file: No such file or directory
ERROR: [Loader Message] Code 0 : loader_icd_scan: Failed loading library associated with ICD JSON libGLX_nvidia.so.0. Ignoring this JSON
'DISPLAY' environment variable not set... skipping surface info
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
==========
VULKANINFO
==========
Vulkan Instance Version: 1.3.275
Instance Extensions: count = 24
-------------------------------
VK_EXT_acquire_drm_display : extension revision 1
VK_EXT_acquire_xlib_display : extension revision 1
VK_EXT_debug_report : extension revision 10
VK_EXT_debug_utils : extension revision 2
VK_EXT_direct_mode_display : extension revision 1
VK_EXT_display_surface_counter : extension revision 1
VK_EXT_headless_surface : extension revision 1
VK_EXT_surface_maintenance1 : extension revision 1
VK_EXT_swapchain_colorspace : extension revision 5
VK_KHR_device_group_creation : extension revision 1
VK_KHR_display : extension revision 23
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2 : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_portability_enumeration : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_surface_protected_capabilities : extension revision 1
VK_KHR_wayland_surface : extension revision 6
VK_KHR_xcb_surface : extension revision 6
VK_KHR_xlib_surface : extension revision 6
VK_LUNARG_direct_driver_loading : extension revision 1
Instance Layers: count = 5
--------------------------
VK_LAYER_INTEL_nullhw INTEL NULL HW 1.1.73 version 1
VK_LAYER_MESA_device_select Linux device selection layer 1.4.303 version 1
VK_LAYER_MESA_overlay Mesa Overlay layer 1.4.303 version 1
VK_LAYER_NV_optimus NVIDIA Optimus layer 1.4.341 version 1
VK_LAYER_NV_present NVIDIA Presentation Layer 1.4.341 version 1
Devices:
========
GPU0:
apiVersion = 1.4.318
driverVersion = 25.2.8
vendorID = 0x10005
deviceID = 0x0000
deviceType = PHYSICAL_DEVICE_TYPE_CPU
deviceName = llvmpipe (LLVM 20.1.2, 256 bits)
driverID = DRIVER_ID_MESA_LLVMPIPE
driverName = llvmpipe
driverInfo = Mesa 25.2.8-0ubuntu0.24.04.2 (LLVM 20.1.2)
conformanceVersion = 1.3.1.1
deviceUUID = 6d657361-3235-2e32-2e38-2d3075627500
driverUUID = 6c6c766d-7069-7065-5555-494400000000So the GPU is being passed in but vulkan cannot see it. Any help would be greatly appreciated. I have already tried using the unraid vulkan pluging I found on github to no avail, I have tried to manually generate nvidia vulkan ICDs to no avail. I'm out of ideas and not sure why it's not working. I have tried both the current "production" nvidia 595.80 driver and current 6nn.n+ driver branch. Thanks!