mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Merge branch 'rename-library-search-path' into 'main'
Add library-search-path option to cdi generate See merge request nvidia/container-toolkit/container-toolkit!468
This commit is contained in:
commit
e7ae0f183c
@ -5,6 +5,8 @@
|
||||
* Remove installation of OCI hook JSON from RPM package.
|
||||
* Refactored config for `nvidia-container-runtime-hook`.
|
||||
* Added a `nvidia-ctk config` command which supports setting config options using a `--set` flag.
|
||||
* Added `--library-search-path` option to `nvidia-ctk cdi generate` command in `csv` mode. This allows folders where
|
||||
libraries are located to be specified explicitly.
|
||||
|
||||
## v1.14.0-rc.2
|
||||
* Fix bug causing incorrect nvidia-smi symlink to be created on WSL2 systems with multiple driver roots.
|
||||
|
@ -50,9 +50,10 @@ type options struct {
|
||||
vendor string
|
||||
class string
|
||||
|
||||
librarySearchPaths cli.StringSlice
|
||||
|
||||
csv struct {
|
||||
files cli.StringSlice
|
||||
librarySearchPaths cli.StringSlice
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,6 +111,11 @@ func (m command) build() *cli.Command {
|
||||
Usage: "Specify the NVIDIA GPU driver root to use when discovering the entities that should be included in the CDI specification.",
|
||||
Destination: &opts.driverRoot,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "library-search-path",
|
||||
Usage: "Specify the path to search for libraries when discovering the entities that should be included in the CDI specification.\n\tNote: This option only applies to CSV mode.",
|
||||
Destination: &opts.librarySearchPaths,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "nvidia-ctk-path",
|
||||
Usage: "Specify the path to use for the nvidia-ctk in the generated CDI specification. If this is left empty, the path will be searched.",
|
||||
@ -135,11 +141,6 @@ func (m command) build() *cli.Command {
|
||||
Value: cli.NewStringSlice(csv.DefaultFileList()...),
|
||||
Destination: &opts.csv.files,
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "csv.library-search-path",
|
||||
Usage: "Specify the path to search for libraries when discovering the entities that should be included in the CDI specification. This currently only affects CDI mode",
|
||||
Destination: &opts.csv.librarySearchPaths,
|
||||
},
|
||||
}
|
||||
|
||||
return &c
|
||||
@ -233,7 +234,7 @@ func (m command) generateSpec(opts *options) (spec.Interface, error) {
|
||||
nvcdi.WithDeviceNamer(deviceNamer),
|
||||
nvcdi.WithMode(string(opts.mode)),
|
||||
nvcdi.WithCSVFiles(opts.csv.files.Value()),
|
||||
nvcdi.WithLibrarySearchPaths(opts.csv.librarySearchPaths.Value()),
|
||||
nvcdi.WithLibrarySearchPaths(opts.librarySearchPaths.Value()),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create CDI library: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user