Remove deprecated --runtime-args from nvidia-ctk-installer

The GPU Operator no longer sets the RUNTIME_ARGS environment variable
to control the runtime and instead sets general environment variables.

This change removes support for setting RUNTIME_ARGS in the CLI as these
settings have no effect.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2025-03-13 16:20:37 +02:00
parent 025407543f
commit 89b99ff786

View File

@ -22,8 +22,7 @@ const (
defaultPidFile = "/run/nvidia/toolkit/" + toolkitPidFilename defaultPidFile = "/run/nvidia/toolkit/" + toolkitPidFilename
toolkitSubDir = "toolkit" toolkitSubDir = "toolkit"
defaultRuntime = "docker" defaultRuntime = "docker"
defaultRuntimeArgs = ""
) )
var availableRuntimes = map[string]struct{}{"docker": {}, "crio": {}, "containerd": {}} var availableRuntimes = map[string]struct{}{"docker": {}, "crio": {}, "containerd": {}}
@ -34,12 +33,11 @@ var signalReceived = make(chan bool, 1)
// options stores the command line arguments // options stores the command line arguments
type options struct { type options struct {
noDaemon bool noDaemon bool
runtime string runtime string
runtimeArgs string root string
root string pidFile string
pidFile string sourceRoot string
sourceRoot string
toolkitOptions toolkit.Options toolkitOptions toolkit.Options
runtimeOptions runtime.Options runtimeOptions runtime.Options
@ -124,15 +122,6 @@ func (a app) build() *cli.App {
Destination: &options.runtime, Destination: &options.runtime,
EnvVars: []string{"RUNTIME"}, EnvVars: []string{"RUNTIME"},
}, },
// TODO: Remove runtime-args
&cli.StringFlag{
Name: "runtime-args",
Aliases: []string{"u"},
Usage: "arguments to pass to 'docker', 'crio', or 'containerd' setup command",
Value: defaultRuntimeArgs,
Destination: &options.runtimeArgs,
EnvVars: []string{"RUNTIME_ARGS"},
},
&cli.StringFlag{ &cli.StringFlag{
Name: "root", Name: "root",
Value: a.defaultRoot, Value: a.defaultRoot,