@@ -56,9 +56,10 @@ func TestGetConfig(t *testing.T) {
5656 AcceptEnvvarUnprivileged : true ,
5757 SupportedDriverCapabilities : "compat32,compute,display,graphics,ngx,utility,video" ,
5858 NVIDIAContainerCLIConfig : ContainerCLIConfig {
59- Root : "" ,
60- LoadKmods : true ,
61- Ldconfig : "@/test/ld/config/path" ,
59+ Root : "" ,
60+ LoadKmods : true ,
61+ Ldconfig : "@/test/ld/config/path" ,
62+ CUDACompatMode : "ldconfig" ,
6263 },
6364 NVIDIAContainerRuntimeConfig : RuntimeConfig {
6465 DebugFilePath : "/dev/null" ,
@@ -93,6 +94,7 @@ func TestGetConfig(t *testing.T) {
9394 "nvidia-container-cli.load-kmods = false" ,
9495 "nvidia-container-cli.ldconfig = \" @/foo/bar/ldconfig\" " ,
9596 "nvidia-container-cli.user = \" foo:bar\" " ,
97+ "nvidia-container-cli.cuda-compat-mode = \" mount\" " ,
9698 "nvidia-container-runtime.debug = \" /foo/bar\" " ,
9799 "nvidia-container-runtime.discover-mode = \" not-legacy\" " ,
98100 "nvidia-container-runtime.log-level = \" debug\" " ,
@@ -109,10 +111,11 @@ func TestGetConfig(t *testing.T) {
109111 AcceptEnvvarUnprivileged : false ,
110112 SupportedDriverCapabilities : "compute,utility" ,
111113 NVIDIAContainerCLIConfig : ContainerCLIConfig {
112- Root : "/bar/baz" ,
113- LoadKmods : false ,
114- Ldconfig : "@/foo/bar/ldconfig" ,
115- User : "foo:bar" ,
114+ Root : "/bar/baz" ,
115+ LoadKmods : false ,
116+ Ldconfig : "@/foo/bar/ldconfig" ,
117+ User : "foo:bar" ,
118+ CUDACompatMode : "mount" ,
116119 },
117120 NVIDIAContainerRuntimeConfig : RuntimeConfig {
118121 DebugFilePath : "/foo/bar" ,
@@ -156,8 +159,9 @@ func TestGetConfig(t *testing.T) {
156159 AcceptEnvvarUnprivileged : true ,
157160 SupportedDriverCapabilities : "compat32,compute,display,graphics,ngx,utility,video" ,
158161 NVIDIAContainerCLIConfig : ContainerCLIConfig {
159- Ldconfig : "/foo/bar/ldconfig" ,
160- LoadKmods : true ,
162+ Ldconfig : "/foo/bar/ldconfig" ,
163+ LoadKmods : true ,
164+ CUDACompatMode : "ldconfig" ,
161165 },
162166 NVIDIAContainerRuntimeConfig : RuntimeConfig {
163167 DebugFilePath : "/dev/null" ,
@@ -200,6 +204,7 @@ func TestGetConfig(t *testing.T) {
200204 "root = \" /bar/baz\" " ,
201205 "load-kmods = false" ,
202206 "ldconfig = \" @/foo/bar/ldconfig\" " ,
207+ "cuda-compat-mode = \" mount\" " ,
203208 "user = \" foo:bar\" " ,
204209 "[nvidia-container-runtime]" ,
205210 "debug = \" /foo/bar\" " ,
@@ -222,10 +227,11 @@ func TestGetConfig(t *testing.T) {
222227 AcceptEnvvarUnprivileged : false ,
223228 SupportedDriverCapabilities : "compute,utility" ,
224229 NVIDIAContainerCLIConfig : ContainerCLIConfig {
225- Root : "/bar/baz" ,
226- LoadKmods : false ,
227- Ldconfig : "@/foo/bar/ldconfig" ,
228- User : "foo:bar" ,
230+ Root : "/bar/baz" ,
231+ LoadKmods : false ,
232+ Ldconfig : "@/foo/bar/ldconfig" ,
233+ CUDACompatMode : "mount" ,
234+ User : "foo:bar" ,
229235 },
230236 NVIDIAContainerRuntimeConfig : RuntimeConfig {
231237 DebugFilePath : "/foo/bar" ,
@@ -264,10 +270,11 @@ func TestGetConfig(t *testing.T) {
264270 AcceptEnvvarUnprivileged : true ,
265271 SupportedDriverCapabilities : "compat32,compute,display,graphics,ngx,utility,video" ,
266272 NVIDIAContainerCLIConfig : ContainerCLIConfig {
267- Root : "" ,
268- LoadKmods : true ,
269- Ldconfig : "@/test/ld/config/path" ,
270- User : "root:video" ,
273+ Root : "" ,
274+ LoadKmods : true ,
275+ Ldconfig : "@/test/ld/config/path" ,
276+ CUDACompatMode : "ldconfig" ,
277+ User : "root:video" ,
271278 },
272279 NVIDIAContainerRuntimeConfig : RuntimeConfig {
273280 DebugFilePath : "/dev/null" ,
@@ -303,10 +310,11 @@ func TestGetConfig(t *testing.T) {
303310 AcceptEnvvarUnprivileged : true ,
304311 SupportedDriverCapabilities : "compat32,compute,display,graphics,ngx,utility,video" ,
305312 NVIDIAContainerCLIConfig : ContainerCLIConfig {
306- Root : "" ,
307- LoadKmods : true ,
308- Ldconfig : "@/test/ld/config/path" ,
309- User : "foo:bar" ,
313+ Root : "" ,
314+ LoadKmods : true ,
315+ Ldconfig : "@/test/ld/config/path" ,
316+ CUDACompatMode : "ldconfig" ,
317+ User : "foo:bar" ,
310318 },
311319 NVIDIAContainerRuntimeConfig : RuntimeConfig {
312320 DebugFilePath : "/dev/null" ,
0 commit comments