You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove positional arguments from nvidia-ctk-installer
Parsing positional arguments require additional processing
instead of relying on named flags. This change switches to
using a named flag for specifying the toolkit installation directory.
Signed-off-by: Evan Lezar <[email protected]>
c.Description="DESTINATION points to the host path underneath which the nvidia-container-toolkit should be installed.\nIt will be installed at ${DESTINATION}/toolkit"
88
+
c.Usage="Install the NVIDIA Container Toolkit and configure the specified runtime to use the `nvidia` runtime."
100
89
c.Version=info.GetVersionString()
101
90
c.Before=func(ctx*cli.Context) error {
102
91
returna.Before(ctx, &options)
@@ -123,11 +112,15 @@ func (a app) build() *cli.App {
123
112
EnvVars: []string{"RUNTIME"},
124
113
},
125
114
&cli.StringFlag{
126
-
Name: "root",
127
-
Value: a.defaultRoot,
128
-
Usage: "the folder where the NVIDIA Container Toolkit is to be installed. It will be installed to `ROOT`/toolkit",
129
-
Destination: &options.root,
130
-
EnvVars: []string{"ROOT"},
115
+
Name: "toolkit-install-dir",
116
+
Aliases: []string{"root"},
117
+
Usage: "The directory where the NVIDIA Container Toolkit is to be installed. "+
118
+
"The components of the toolkit will be installed to `ROOT`/toolkit. "+
119
+
"Note that in the case of a containerized installer, this is the path in the container and it is "+
120
+
"recommended that this match the path on the host.",
121
+
Value: defaultToolkitInstallDir,
122
+
Destination: &options.toolkitInstallDir,
123
+
EnvVars: []string{"TOOLKIT_INSTALL_DIR", "ROOT"},
131
124
},
132
125
&cli.StringFlag{
133
126
Name: "source-root",
@@ -161,7 +154,7 @@ func (a *app) Before(c *cli.Context, o *options) error {
0 commit comments