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:
@@ -19,6 +19,7 @@ package nvcdi
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/internal/discover/csv"
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/spec"
|
||||
"github.com/NVIDIA/nvidia-container-toolkit/pkg/nvcdi/transform"
|
||||
"github.com/sirupsen/logrus"
|
||||
@@ -84,11 +85,7 @@ func New(opts ...Option) (Interface, error) {
|
||||
switch l.resolveMode() {
|
||||
case ModeCSV:
|
||||
if len(l.csvFiles) == 0 {
|
||||
l.csvFiles = []string{
|
||||
"/etc/nvidia-container-runtime/host-files-for-container.d/l4t.csv",
|
||||
"/etc/nvidia-container-runtime/host-files-for-container.d/drivers.csv",
|
||||
"/etc/nvidia-container-runtime/host-files-for-container.d/devices.csv",
|
||||
}
|
||||
l.csvFiles = csv.DefaultFileList()
|
||||
}
|
||||
lib = (*csvlib)(l)
|
||||
case ModeManagement:
|
||||
|
||||
Reference in New Issue
Block a user