diff --git a/internal/runtime/runtime_factory.go b/internal/runtime/runtime_factory.go index 9832fd66..2ff3a1f5 100644 --- a/internal/runtime/runtime_factory.go +++ b/internal/runtime/runtime_factory.go @@ -44,7 +44,7 @@ func newNVIDIAContainerRuntime(logger logger.Interface, cfg *config.Config, argv return nil, fmt.Errorf("error constructing OCI specification: %v", err) } - specModifier, err := newSpecModifier(logger, cfg, ociSpec, argv) + specModifier, err := newSpecModifier(logger, cfg, ociSpec) if err != nil { return nil, fmt.Errorf("failed to construct OCI spec modifier: %v", err) } @@ -61,7 +61,7 @@ func newNVIDIAContainerRuntime(logger logger.Interface, cfg *config.Config, argv } // newSpecModifier is a factory method that creates constructs an OCI spec modifer based on the provided config. -func newSpecModifier(logger logger.Interface, cfg *config.Config, ociSpec oci.Spec, argv []string) (oci.SpecModifier, error) { +func newSpecModifier(logger logger.Interface, cfg *config.Config, ociSpec oci.Spec) (oci.SpecModifier, error) { rawSpec, err := ociSpec.Load() if err != nil { return nil, fmt.Errorf("failed to load OCI spec: %v", err) @@ -73,7 +73,7 @@ func newSpecModifier(logger logger.Interface, cfg *config.Config, ociSpec oci.Sp } mode := info.ResolveAutoMode(logger, cfg.NVIDIAContainerRuntimeConfig.Mode, image) - modeModifier, err := newModeModifier(logger, mode, cfg, ociSpec, argv) + modeModifier, err := newModeModifier(logger, mode, cfg, ociSpec) if err != nil { return nil, err } @@ -106,7 +106,7 @@ func newSpecModifier(logger logger.Interface, cfg *config.Config, ociSpec oci.Sp return modifiers, nil } -func newModeModifier(logger logger.Interface, mode string, cfg *config.Config, ociSpec oci.Spec, argv []string) (oci.SpecModifier, error) { +func newModeModifier(logger logger.Interface, mode string, cfg *config.Config, ociSpec oci.Spec) (oci.SpecModifier, error) { switch mode { case "legacy": return modifier.NewStableRuntimeModifier(logger, cfg.NVIDIAContainerRuntimeHookConfig.Path), nil