Ensure that generate uses a consistent nvidia-ctk path

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2023-02-17 11:11:18 +02:00
parent 25811471fa
commit a844749791

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
}