mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Remove support for config overrides
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -67,8 +67,8 @@ func ParseArgs(c *cli.Context, o *Options) error {
|
||||
}
|
||||
|
||||
// Configure applies the options to the specified config
|
||||
func (o Options) Configure(cfg engine.Interface, configOverrides ...map[string]interface{}) error {
|
||||
err := o.UpdateConfig(cfg, configOverrides...)
|
||||
func (o Options) Configure(cfg engine.Interface) error {
|
||||
err := o.UpdateConfig(cfg)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to update config: %v", err)
|
||||
}
|
||||
@@ -98,14 +98,14 @@ func (o Options) flush(cfg engine.Interface) error {
|
||||
}
|
||||
|
||||
// UpdateConfig updates the specified config to include the nvidia runtimes
|
||||
func (o Options) UpdateConfig(cfg engine.Interface, configOverrides ...map[string]interface{}) error {
|
||||
func (o Options) UpdateConfig(cfg engine.Interface) error {
|
||||
runtimes := operator.GetRuntimes(
|
||||
operator.WithNvidiaRuntimeName(o.RuntimeName),
|
||||
operator.WithSetAsDefault(o.SetAsDefault),
|
||||
operator.WithRoot(o.RuntimeDir),
|
||||
)
|
||||
for name, runtime := range runtimes {
|
||||
err := cfg.AddRuntime(name, runtime.Path, runtime.SetAsDefault, configOverrides...)
|
||||
err := cfg.AddRuntime(name, runtime.Path, runtime.SetAsDefault)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to update runtime %q: %v", name, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user