neko/.docker/base/nvidia/entrypoint.sh
Miroslav Šedivý 55005a6f8d
Add nvidia docker gpu acceleration (#238)
* add nvidia dockerfile.

* add nvidia docker to build.

* remove vaapi.

* add google chrome and brave.

* upgrade to virtualgl 3.1.

* add disable-seccomp-filter-sandbox to chrome.

* use vgl display in vglrun.

* Revert "use vgl display in vglrun."

This reverts commit 0cd556b5d8.

* update chrome params.

* update changelog.

* update brave.

* update CI.
2023-03-17 01:12:35 +01:00

13 lines
331 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 "$@"
else
echo "No GPU detected"
exec "$@"
fi