mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Merge pull request #748 from elezar/fix-operator
Add aliases for runtime-specific envvars
This commit is contained in:
commit
5931136879
@ -50,14 +50,14 @@ func Flags(opts *Options) []cli.Flag {
|
|||||||
Usage: "Path to the runtime config file",
|
Usage: "Path to the runtime config file",
|
||||||
Value: runtimeSpecificDefault,
|
Value: runtimeSpecificDefault,
|
||||||
Destination: &opts.Config,
|
Destination: &opts.Config,
|
||||||
EnvVars: []string{"RUNTIME_CONFIG"},
|
EnvVars: []string{"RUNTIME_CONFIG", "CONTAINERD_CONFIG", "DOCKER_CONFIG"},
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "socket",
|
Name: "socket",
|
||||||
Usage: "Path to the runtime socket file",
|
Usage: "Path to the runtime socket file",
|
||||||
Value: runtimeSpecificDefault,
|
Value: runtimeSpecificDefault,
|
||||||
Destination: &opts.Socket,
|
Destination: &opts.Socket,
|
||||||
EnvVars: []string{"RUNTIME_SOCKET"},
|
EnvVars: []string{"RUNTIME_SOCKET", "CONTAINERD_SOCKET", "DOCKER_SOCKET"},
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "restart-mode",
|
Name: "restart-mode",
|
||||||
@ -79,14 +79,14 @@ func Flags(opts *Options) []cli.Flag {
|
|||||||
Usage: "Specify the name of the `nvidia` runtime. If set-as-default is selected, the runtime is used as the default runtime.",
|
Usage: "Specify the name of the `nvidia` runtime. If set-as-default is selected, the runtime is used as the default runtime.",
|
||||||
Value: defaultRuntimeName,
|
Value: defaultRuntimeName,
|
||||||
Destination: &opts.RuntimeName,
|
Destination: &opts.RuntimeName,
|
||||||
EnvVars: []string{"NVIDIA_RUNTIME_NAME"},
|
EnvVars: []string{"NVIDIA_RUNTIME_NAME", "CONTAINERD_RUNTIME_CLASS", "DOCKER_RUNTIME_NAME"},
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "set-as-default",
|
Name: "set-as-default",
|
||||||
Usage: "Set the `nvidia` runtime as the default runtime.",
|
Usage: "Set the `nvidia` runtime as the default runtime.",
|
||||||
Value: defaultSetAsDefault,
|
Value: defaultSetAsDefault,
|
||||||
Destination: &opts.SetAsDefault,
|
Destination: &opts.SetAsDefault,
|
||||||
EnvVars: []string{"NVIDIA_RUNTIME_SET_AS_DEFAULT"},
|
EnvVars: []string{"NVIDIA_RUNTIME_SET_AS_DEFAULT", "CONTAINERD_SET_AS_DEFAULT", "DOCKER_SET_AS_DEFAULT"},
|
||||||
Hidden: true,
|
Hidden: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user