mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Merge branch 'fix-nvcdi-constructor' into 'main'
fix: apply options when constructing an instance of the nvcdi library See merge request nvidia/container-toolkit/container-toolkit!294
This commit is contained in:
commit
b4ab95f00c
@ -37,6 +37,9 @@ type nvcdilib struct {
|
||||
// New creates a new nvcdi library
|
||||
func New(opts ...Option) Interface {
|
||||
l := &nvcdilib{}
|
||||
for _, opt := range opts {
|
||||
opt(l)
|
||||
}
|
||||
|
||||
if l.nvmllib == nil {
|
||||
l.nvmllib = nvml.New()
|
||||
|
Loading…
Reference in New Issue
Block a user