mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 00:08:11 +00:00
Specify DRIVER_ROOT consistently
This change ensures that CLI tools that require the path to the driver root accept both the NVIDIA_DRIVER_ROOT and DRIVER_ROOT environment variables in addition to the --driver-root command line argument. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
e96edb3f36
commit
f89cef307d
@ -87,7 +87,7 @@ func (m command) build() *cli.Command {
|
|||||||
Usage: "The path to the driver root. `DRIVER_ROOT`/dev is searched for NVIDIA device nodes.",
|
Usage: "The path to the driver root. `DRIVER_ROOT`/dev is searched for NVIDIA device nodes.",
|
||||||
Value: "/",
|
Value: "/",
|
||||||
Destination: &cfg.driverRoot,
|
Destination: &cfg.driverRoot,
|
||||||
EnvVars: []string{"DRIVER_ROOT"},
|
EnvVars: []string{"NVIDIA_DRIVER_ROOT", "DRIVER_ROOT"},
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "watch",
|
Name: "watch",
|
||||||
|
@ -69,7 +69,7 @@ func (m command) build() *cli.Command {
|
|||||||
Usage: "the path to the driver root. Device nodes will be created at `DRIVER_ROOT`/dev",
|
Usage: "the path to the driver root. Device nodes will be created at `DRIVER_ROOT`/dev",
|
||||||
Value: "/",
|
Value: "/",
|
||||||
Destination: &opts.driverRoot,
|
Destination: &opts.driverRoot,
|
||||||
EnvVars: []string{"DRIVER_ROOT"},
|
EnvVars: []string{"NVIDIA_DRIVER_ROOT", "DRIVER_ROOT"},
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "control-devices",
|
Name: "control-devices",
|
||||||
|
@ -62,7 +62,7 @@ func (m command) build() *cli.Command {
|
|||||||
Usage: "the path to the driver root. Device nodes will be created at `DRIVER_ROOT`/dev",
|
Usage: "the path to the driver root. Device nodes will be created at `DRIVER_ROOT`/dev",
|
||||||
Value: "/",
|
Value: "/",
|
||||||
Destination: &opts.driverRoot,
|
Destination: &opts.driverRoot,
|
||||||
EnvVars: []string{"DRIVER_ROOT"},
|
EnvVars: []string{"NVIDIA_DRIVER_ROOT", "DRIVER_ROOT"},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,10 +118,11 @@ func main() {
|
|||||||
|
|
||||||
flags := []cli.Flag{
|
flags := []cli.Flag{
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "nvidia-driver-root",
|
Name: "driver-root",
|
||||||
|
Aliases: []string{"nvidia-driver-root"},
|
||||||
Value: DefaultNvidiaDriverRoot,
|
Value: DefaultNvidiaDriverRoot,
|
||||||
Destination: &opts.DriverRoot,
|
Destination: &opts.DriverRoot,
|
||||||
EnvVars: []string{"NVIDIA_DRIVER_ROOT"},
|
EnvVars: []string{"NVIDIA_DRIVER_ROOT", "DRIVER_ROOT"},
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "driver-root-ctr-path",
|
Name: "driver-root-ctr-path",
|
||||||
|
Loading…
Reference in New Issue
Block a user