neko/.docker/base/nvidia/entrypoint.sh
2023-03-17 00:39:59 +01:00

13 lines
347 B
Bash
Executable File

#!/bin/bash -e
# Add VirtualGL directories to path
export PATH="${PATH}:/opt/VirtualGL/bin"
# Use VirtualGL to run wine with OpenGL if the GPU is available, otherwise use barebone wine
if [ -n "$(nvidia-smi --query-gpu=uuid --format=csv | sed -n 2p)" ]; then
exec vglrun -d $VGL_DISPLAY "$@"
else
echo "No GPU detected"
exec "$@"
fi