update nvidia detection to handle hosts that use runtime with no GPU

This commit is contained in:
thelamer 2025-08-08 09:40:10 -04:00
parent 399f70c225
commit 3bff71b88d
No known key found for this signature in database

View File

@ -46,7 +46,7 @@ if [ ! -f "${STARTUP_FILE}" ]; then
fi
# Enable Nvidia GPU support if detected
if which nvidia-smi && [ "${DISABLE_ZINK}" == "false" ]; then
if which nvidia-smi > /dev/null 2>&1 && ls -A /dev/dri 2>/dev/null && [ "${DISABLE_ZINK}" == "false" ]; then
export LIBGL_KOPPER_DRI2=1
export MESA_LOADER_DRIVER_OVERRIDE=zink
export GALLIUM_DRIVER=zink