From 036c7a7f867c566a4cd9efce488968544c0e3b05 Mon Sep 17 00:00:00 2001 From: Christian Geller Date: Mon, 16 Nov 2026 15:10:44 +0100 Subject: [PATCH] take glx vendor from host to support remote setups --- README.md | 3 +++ utils/compose/README.md | 2 ++ utils/compose/docker-compose.template.yml | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a2df8956..78798564 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,9 @@ OpenADStack is usually part of a larger deployment composition, for example with > The extended demo requires an NVIDIA GPU with compute capability 8.0 or higher, and additional disk > space of 14GB for its larger bag files. +> [!NOTE] +> On machines with multiple GPUs where the display is not driven by the NVIDIA GPU (e.g., laptops with hybrid graphics), run `export __GLX_VENDOR_LIBRARY_NAME=nvidia` before starting the demo so that RViz renders on the NVIDIA GPU. + - **Stop** the demo with: ```bash diff --git a/utils/compose/README.md b/utils/compose/README.md index 0aa0c6f0..f7e3b8c7 100644 --- a/utils/compose/README.md +++ b/utils/compose/README.md @@ -24,6 +24,8 @@ The definitions in `docker-compose.template.yml` centralize shared lifecycle, mi `ros2-service` selects `zenoh`, `fastrtps`, or `cyclone` through `RMW`. The selected implementation must already be installed in the OpenADService container image. `triton-server` and `zenoh-router` are concrete infrastructure Compose services rather than base templates. +GPU services take `__GLX_VENDOR_LIBRARY_NAME` from the host. If it is unset, graphical applications such as RViz use the OpenGL vendor reported by the X server, which also works in remote setups such as VNC. On machines with multiple GPUs where the display is not driven by the NVIDIA GPU (e.g., laptops with hybrid graphics), run `export __GLX_VENDOR_LIBRARY_NAME=nvidia` before starting the services. + ```mermaid flowchart BT diff --git a/utils/compose/docker-compose.template.yml b/utils/compose/docker-compose.template.yml index a53a154c..8968e570 100644 --- a/utils/compose/docker-compose.template.yml +++ b/utils/compose/docker-compose.template.yml @@ -39,7 +39,7 @@ services: - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=all - __NV_PRIME_RENDER_OFFLOAD=1 - - __GLX_VENDOR_LIBRARY_NAME=nvidia + - __GLX_VENDOR_LIBRARY_NAME # taken from host: leave unset for auto-detection (required for remote setups, e.g., VNC), export as `nvidia` on multi-GPU machines nvidia-soc-service: extends: @@ -132,7 +132,7 @@ services: - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=all - __NV_PRIME_RENDER_OFFLOAD=1 - - __GLX_VENDOR_LIBRARY_NAME=nvidia + - __GLX_VENDOR_LIBRARY_NAME # taken from host: leave unset for auto-detection (required for remote setups, e.g., VNC), export as `nvidia` on multi-GPU machines ros2-nvidia-soc-service: extends: