Merge branch 'fix-nvidia-ctk-path' into 'main'

Ensure that generate uses a consistent nvidia-ctk path

See merge request nvidia/container-toolkit/container-toolkit!301
This commit is contained in:
Evan Lezar 2023-02-20 08:29:44 +00:00
commit 6adb792d57

View File

@ -23,6 +23,7 @@ import (
"path/filepath"
"strings"
"github.com/NVIDIA/nvidia-container-toolkit/internal/discover"
"github.com/NVIDIA/nvidia-container-toolkit/internal/edits"
"github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi"
"github.com/container-orchestrated-devices/container-device-interface/pkg/cdi"
@ -122,6 +123,8 @@ func (m command) validateFlags(r *cli.Context, cfg *config) error {
return err
}
cfg.nvidiaCTKPath = discover.FindNvidiaCTK(m.logger, cfg.nvidiaCTKPath)
return nil
}