From 31cc95adfd37cda9206175e7d480e93821456a23 Mon Sep 17 00:00:00 2001
From: Matt Godbolt <matt@godbolt.org>
Date: Tue, 29 Nov 2022 07:16:23 -0600
Subject: [PATCH] Make the same NVidia magic devices available in compilation
 too. May help nvc++ compilation time as it will be able to detect the target
 GPU (#4361)

---
 etc/nsjail/execute.cfg | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/etc/nsjail/execute.cfg b/etc/nsjail/execute.cfg
index 912c24fde..0733f1c25 100644
--- a/etc/nsjail/execute.cfg
+++ b/etc/nsjail/execute.cfg
@@ -132,6 +132,34 @@ mount {
     is_bind: true
 }
 
+mount {
+    src: "/dev/nvidia0"
+    dst: "/dev/nvidia0"
+    is_bind: true
+    mandatory: false
+}
+
+mount {
+    src: "/dev/nvidiactl"
+    dst: "/dev/nvidiactl"
+    is_bind: true
+    mandatory: false
+}
+
+mount {
+    src: "/dev/nvidia-modeset"
+    dst: "/dev/nvidia-modeset"
+    is_bind: true
+    mandatory: false
+}
+
+mount {
+    src: "/dev/nvidia-uvm"
+    dst: "/dev/nvidia-uvm"
+    is_bind: true
+    mandatory: false
+}
+
 mount {
     dst: "/proc"
     fstype: "proc"
-- 
GitLab