mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 00:08:11 +00:00
Merge branch 'add-runtimes' into 'main'
Add nvidia-container-runtime.runtimes config option See merge request nvidia/container-toolkit/container-toolkit!364
This commit is contained in:
commit
8eef7e5406
@ -54,6 +54,8 @@ type options struct {
|
|||||||
ContainerRuntimeModesCdiDefaultKind string
|
ContainerRuntimeModesCdiDefaultKind string
|
||||||
ContainerRuntimeModesCDIAnnotationPrefixes cli.StringSlice
|
ContainerRuntimeModesCDIAnnotationPrefixes cli.StringSlice
|
||||||
|
|
||||||
|
ContainerRuntimeRuntimes cli.StringSlice
|
||||||
|
|
||||||
ContainerRuntimeHookSkipModeDetection bool
|
ContainerRuntimeHookSkipModeDetection bool
|
||||||
|
|
||||||
ContainerCLIDebug string
|
ContainerCLIDebug string
|
||||||
@ -153,6 +155,11 @@ func main() {
|
|||||||
Destination: &opts.ContainerRuntimeModesCDIAnnotationPrefixes,
|
Destination: &opts.ContainerRuntimeModesCDIAnnotationPrefixes,
|
||||||
EnvVars: []string{"NVIDIA_CONTAINER_RUNTIME_MODES_CDI_ANNOTATION_PREFIXES"},
|
EnvVars: []string{"NVIDIA_CONTAINER_RUNTIME_MODES_CDI_ANNOTATION_PREFIXES"},
|
||||||
},
|
},
|
||||||
|
&cli.StringSliceFlag{
|
||||||
|
Name: "nvidia-container-runtime.runtimes",
|
||||||
|
Destination: &opts.ContainerRuntimeRuntimes,
|
||||||
|
EnvVars: []string{"NVIDIA_CONTAINER_RUNTIME_RUNTIMES"},
|
||||||
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "nvidia-container-runtime-hook.skip-mode-detection",
|
Name: "nvidia-container-runtime-hook.skip-mode-detection",
|
||||||
Value: true,
|
Value: true,
|
||||||
@ -416,6 +423,7 @@ func installToolkitConfig(c *cli.Context, toolkitConfigPath string, nvidiaContai
|
|||||||
"nvidia-container-runtime.mode": opts.ContainerRuntimeMode,
|
"nvidia-container-runtime.mode": opts.ContainerRuntimeMode,
|
||||||
"nvidia-container-runtime.modes.cdi.annotation-prefixes": opts.ContainerRuntimeModesCDIAnnotationPrefixes,
|
"nvidia-container-runtime.modes.cdi.annotation-prefixes": opts.ContainerRuntimeModesCDIAnnotationPrefixes,
|
||||||
"nvidia-container-runtime.modes.cdi.default-kind": opts.ContainerRuntimeModesCdiDefaultKind,
|
"nvidia-container-runtime.modes.cdi.default-kind": opts.ContainerRuntimeModesCdiDefaultKind,
|
||||||
|
"nvidia-container-runtime.runtimes": opts.ContainerRuntimeRuntimes,
|
||||||
"nvidia-container-cli.debug": opts.ContainerCLIDebug,
|
"nvidia-container-cli.debug": opts.ContainerCLIDebug,
|
||||||
}
|
}
|
||||||
for key, value := range optionalConfigValues {
|
for key, value := range optionalConfigValues {
|
||||||
|
Loading…
Reference in New Issue
Block a user