mirror of
				https://github.com/NVIDIA/nvidia-container-toolkit
				synced 2025-06-26 18:18:24 +00:00 
			
		
		
		
	Merge branch 'bug-fixes' into 'main'
Minor fixes and cleanups See merge request nvidia/container-toolkit/container-toolkit!449
This commit is contained in:
		
						commit
						2c5761d32e
					
				| @ -130,7 +130,7 @@ func (m command) build() *cli.Command { | ||||
| 		}, | ||||
| 		&cli.StringSliceFlag{ | ||||
| 			Name:        "csv.file", | ||||
| 			Usage:       "The path to the list of CSV files to use when generating the CDI specification in CDI mode.", | ||||
| 			Usage:       "The path to the list of CSV files to use when generating the CDI specification in CSV mode.", | ||||
| 			Value:       cli.NewStringSlice(csv.DefaultFileList()...), | ||||
| 			Destination: &opts.csv.files, | ||||
| 		}, | ||||
|  | ||||
							
								
								
									
										2
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.sum
									
									
									
									
									
								
							| @ -5,8 +5,6 @@ github.com/NVIDIA/go-nvml v0.12.0-1 h1:6mdjtlFo+17dWL7VFPfuRMtf0061TF4DKls9pkSw6 | ||||
| github.com/NVIDIA/go-nvml v0.12.0-1/go.mod h1:hy7HYeQy335x6nEss0Ne3PYqleRa6Ct+VKD9RQ4nyFs= | ||||
| github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= | ||||
| github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= | ||||
| github.com/container-orchestrated-devices/container-device-interface v0.5.4-0.20230111111500-5b3b5d81179a h1:sP3PcgyIkRlHqfF3Jfpe/7G8kf/qpzG4C8r94y9hLbE= | ||||
| github.com/container-orchestrated-devices/container-device-interface v0.5.4-0.20230111111500-5b3b5d81179a/go.mod h1:xMRa4fJgXzSDFUCURSimOUgoSc+odohvO3uXT9xjqH0= | ||||
| github.com/container-orchestrated-devices/container-device-interface v0.6.0 h1:aWwcz/Ep0Fd7ZuBjQGjU/jdPloM7ydhMW13h85jZNvk= | ||||
| github.com/container-orchestrated-devices/container-device-interface v0.6.0/go.mod h1:OQlgtJtDrOxSQ1BWODC8OZK1tzi9W69wek+Jy17ndzo= | ||||
| github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= | ||||
|  | ||||
| @ -19,7 +19,7 @@ package info | ||||
| import ( | ||||
| 	"github.com/NVIDIA/nvidia-container-toolkit/internal/config/image" | ||||
| 	"github.com/NVIDIA/nvidia-container-toolkit/internal/logger" | ||||
| 	"github.com/container-orchestrated-devices/container-device-interface/pkg/cdi" | ||||
| 	cdi "github.com/container-orchestrated-devices/container-device-interface/pkg/parser" | ||||
| 	"gitlab.com/nvidia/cloud-native/go-nvlib/pkg/nvlib/info" | ||||
| ) | ||||
| 
 | ||||
|  | ||||
| @ -24,7 +24,7 @@ import ( | ||||
| 	"github.com/NVIDIA/nvidia-container-toolkit/internal/config/image" | ||||
| 	"github.com/NVIDIA/nvidia-container-toolkit/internal/logger" | ||||
| 	"github.com/NVIDIA/nvidia-container-toolkit/internal/oci" | ||||
| 	cdi "github.com/container-orchestrated-devices/container-device-interface/pkg/cdi" | ||||
| 	"github.com/container-orchestrated-devices/container-device-interface/pkg/cdi" | ||||
| 	"github.com/opencontainers/runtime-spec/specs-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 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user