mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Set skip-mode-detection in the toolkit-container by default
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
3a11f6ee0a
commit
ccf73f2505
@ -51,6 +51,8 @@ type options struct {
|
|||||||
ContainerRuntimeDebug string
|
ContainerRuntimeDebug string
|
||||||
ContainerRuntimeLogLevel string
|
ContainerRuntimeLogLevel string
|
||||||
|
|
||||||
|
ContainerRuntimeHookSkipModeDetection bool
|
||||||
|
|
||||||
ContainerCLIDebug string
|
ContainerCLIDebug string
|
||||||
toolkitRoot string
|
toolkitRoot string
|
||||||
|
|
||||||
@ -137,6 +139,12 @@ func main() {
|
|||||||
Destination: &opts.ContainerRuntimeModesCdiDefaultKind,
|
Destination: &opts.ContainerRuntimeModesCdiDefaultKind,
|
||||||
EnvVars: []string{"NVIDIA_CONTAINER_RUNTIME_MODES_CDI_DEFAULT_KIND"},
|
EnvVars: []string{"NVIDIA_CONTAINER_RUNTIME_MODES_CDI_DEFAULT_KIND"},
|
||||||
},
|
},
|
||||||
|
&cli.BoolFlag{
|
||||||
|
Name: "nvidia-container-runtime-hook.skip-mode-detection",
|
||||||
|
Value: true,
|
||||||
|
Destination: &opts.ContainerRuntimeHookSkipModeDetection,
|
||||||
|
EnvVars: []string{"NVIDIA_CONTAINER_RUNTIME_HOOK_SKIP_MODE_DETECTION"},
|
||||||
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "nvidia-container-cli-debug",
|
Name: "nvidia-container-cli-debug",
|
||||||
Usage: "Specify the location of the debug log file for the NVIDIA Container CLI",
|
Usage: "Specify the location of the debug log file for the NVIDIA Container CLI",
|
||||||
@ -371,6 +379,9 @@ func installToolkitConfig(toolkitConfigPath string, nvidiaContainerCliExecutable
|
|||||||
// Set nvidia-ctk options
|
// Set nvidia-ctk options
|
||||||
config.Set("nvidia-ctk.path", nvidiaCTKPath)
|
config.Set("nvidia-ctk.path", nvidiaCTKPath)
|
||||||
|
|
||||||
|
// Set the nvidia-container-runtime-hook options
|
||||||
|
config.Set("nvidia-container-runtime-hook.skip-mode-detection", opts.ContainerRuntimeHookSkipModeDetection)
|
||||||
|
|
||||||
_, err = config.WriteTo(targetConfig)
|
_, err = config.WriteTo(targetConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error writing config: %v", err)
|
return fmt.Errorf("error writing config: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user