mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 00:08:11 +00:00
Fix nvidia-ctk path in spec generation
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
f50efca73f
commit
9c9e6cd324
@ -114,7 +114,10 @@ func (m command) validateFlags(r *cli.Context, cfg *config) error {
|
||||
}
|
||||
|
||||
func (m command) run(c *cli.Context, cfg *config) error {
|
||||
spec, err := m.generateSpec(cfg.root, cfg.nvidiaCTKPath)
|
||||
spec, err := m.generateSpec(
|
||||
cfg.root,
|
||||
discover.FindNvidiaCTK(m.logger, cfg.nvidiaCTKPath),
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to generate CDI spec: %v", err)
|
||||
}
|
||||
@ -202,9 +205,7 @@ func (m command) generateSpec(root string, nvidiaCTKPath string) (*specs.Spec, e
|
||||
|
||||
devicelib := device.New(device.WithNvml(nvmllib))
|
||||
|
||||
useNvidiaCTKPath := discover.FindNvidiaCTK(m.logger, nvidiaCTKPath)
|
||||
|
||||
deviceSpecs, err := m.generateDeviceSpecs(devicelib, root, useNvidiaCTKPath)
|
||||
deviceSpecs, err := m.generateDeviceSpecs(devicelib, root, nvidiaCTKPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create device CDI specs: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user