mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Add csv mode to nvidia-ctk cdi generate command
This chagne allows the csv mode option to specified in the nvidia-ctk cdi generate command and adds a --csv.file option that can be repeated to specify the CSV files to be processed. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -33,6 +33,22 @@ const (
|
||||
DefaultMountSpecPath = "/etc/nvidia-container-runtime/host-files-for-container.d"
|
||||
)
|
||||
|
||||
// DefaultFileList returns the list of CSV files that are used by default.
|
||||
func DefaultFileList() []string {
|
||||
files := []string{
|
||||
"devices.csv",
|
||||
"drivers.csv",
|
||||
"l4t.csv",
|
||||
}
|
||||
|
||||
var paths []string
|
||||
for _, file := range files {
|
||||
paths = append(paths, filepath.Join(DefaultMountSpecPath, file))
|
||||
}
|
||||
|
||||
return paths
|
||||
}
|
||||
|
||||
// GetFileList returns the (non-recursive) list of CSV files in the specified
|
||||
// folder
|
||||
func GetFileList(root string) ([]string, error) {
|
||||
|
||||
Reference in New Issue
Block a user