mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 00:08:11 +00:00
Add nvidia-container-runtime.mode config option
This change allows the nvidia-container-runtime.mode option to be set by the toolkit container. This is controlled by the --nvidia-container-runtime-mode command line argument and the NVIDIA_CONTAINER_RUNTIME_MODE envvar. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
25811471fa
commit
dd0d43e726
@ -41,6 +41,7 @@ const (
|
|||||||
|
|
||||||
type options struct {
|
type options struct {
|
||||||
DriverRoot string
|
DriverRoot string
|
||||||
|
ContainerRuntimeMode string
|
||||||
ContainerRuntimeDebug string
|
ContainerRuntimeDebug string
|
||||||
ContainerRuntimeLogLevel string
|
ContainerRuntimeLogLevel string
|
||||||
ContainerCLIDebug string
|
ContainerCLIDebug string
|
||||||
@ -108,6 +109,11 @@ func main() {
|
|||||||
Destination: &opts.ContainerRuntimeLogLevel,
|
Destination: &opts.ContainerRuntimeLogLevel,
|
||||||
EnvVars: []string{"NVIDIA_CONTAINER_RUNTIME_LOG_LEVEL"},
|
EnvVars: []string{"NVIDIA_CONTAINER_RUNTIME_LOG_LEVEL"},
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "nvidia-container-runtime-mode",
|
||||||
|
Destination: &opts.ContainerRuntimeMode,
|
||||||
|
EnvVars: []string{"NVIDIA_CONTAINER_RUNTIME_MODE"},
|
||||||
|
},
|
||||||
&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",
|
||||||
@ -299,6 +305,7 @@ func installToolkitConfig(toolkitConfigPath string, nvidiaContainerCliExecutable
|
|||||||
debugOptions := map[string]string{
|
debugOptions := map[string]string{
|
||||||
"nvidia-container-runtime.debug": opts.ContainerRuntimeDebug,
|
"nvidia-container-runtime.debug": opts.ContainerRuntimeDebug,
|
||||||
"nvidia-container-runtime.log-level": opts.ContainerRuntimeLogLevel,
|
"nvidia-container-runtime.log-level": opts.ContainerRuntimeLogLevel,
|
||||||
|
"nvidia-container-runtime.mode": opts.ContainerRuntimeMode,
|
||||||
"nvidia-container-cli.debug": opts.ContainerCLIDebug,
|
"nvidia-container-cli.debug": opts.ContainerCLIDebug,
|
||||||
}
|
}
|
||||||
for key, value := range debugOptions {
|
for key, value := range debugOptions {
|
||||||
|
Loading…
Reference in New Issue
Block a user