From 1b34b79bf1dde375792a2b7218513f065b7125e9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 1 Mar 2020 15:34:21 +0100 Subject: Adding post-start hook to set nvidia device ownership. Signed-off-by: Daniel Baumann --- share/hooks/post-start.chown-nvidia.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 share/hooks/post-start.chown-nvidia.sh diff --git a/share/hooks/post-start.chown-nvidia.sh b/share/hooks/post-start.chown-nvidia.sh new file mode 100755 index 0000000..457b6e5 --- /dev/null +++ b/share/hooks/post-start.chown-nvidia.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +if grep -qs nvidia /var/lib/machines/"${NAME}"/etc/group +then + chroot "/var/lib/machines/${NAME}" chown root:nvidia "/dev/nvidia*" +fi -- cgit v1.2.3