neko/.docker/base/nvidia/entrypoint.sh

13 lines
347 B
Bash
Raw Normal View History

2023-01-15 11:35:27 +13:00
#!/bin/bash -e
2023-01-16 10:30:52 +13:00
2023-01-15 11:35:27 +13:00
# 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
2023-03-17 12:39:59 +13:00
exec vglrun -d $VGL_DISPLAY "$@"
2023-01-15 11:35:27 +13:00
else
echo "No GPU detected"
exec "$@"
fi