mirror of
https://github.com/linuxserver/docker-webtop.git
synced 2025-07-08 14:24:50 +02:00
use nvidia-smi to gate zink
This commit is contained in:
parent
ea0b315017
commit
c4c87f882b
@ -42,19 +42,11 @@ if [ ! -f "${STARTUP_FILE}" ]; then
|
|||||||
chmod +x $STARTUP_FILE
|
chmod +x $STARTUP_FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for any render nodes
|
# Enable Nvidia GPU support if detected
|
||||||
for node in /dev/dri/renderD*; do
|
if which nvidia-smi && [ "${DISABLE_ZINK}" == "false" ]; then
|
||||||
if [ -e "$node" ]; then
|
|
||||||
render_node_exists=true
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
# Enable Zink support if detected
|
|
||||||
if [ "$render_node_exists" = true ] && [ "${DISABLE_ZINK}" == "false" ]; then
|
|
||||||
export LIBGL_KOPPER_DRI2=1
|
export LIBGL_KOPPER_DRI2=1
|
||||||
export MESA_LOADER_DRIVER_OVERRIDE=zink
|
export MESA_LOADER_DRIVER_OVERRIDE=zink
|
||||||
export GALLIUM_DRIVER=zink
|
export GALLIUM_DRIVER=zink
|
||||||
unset LD_PRELOAD
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start DE
|
# Start DE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user