File tree 1 file changed +11
-0
lines changed
cmd/nvidia-ctk/cdi/generate
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ type options struct {
60
60
files cli.StringSlice
61
61
ignorePatterns cli.StringSlice
62
62
}
63
+
64
+ // spec represents the CDI spec options.
65
+ spec struct {
66
+ allowAdditionalGIDs bool
67
+ }
63
68
}
64
69
65
70
// NewCommand constructs a generate-cdi command with the specified logger
@@ -169,6 +174,11 @@ func (m command) build() *cli.Command {
169
174
Usage : "Specify a pattern the CSV mount specifications." ,
170
175
Destination : & opts .csv .ignorePatterns ,
171
176
},
177
+ & cli.BoolFlag {
178
+ Name : "--allow-additional-gids" ,
179
+ Usage : "Allow the use of the additionalGIDs field for generated CDI specifications. Note this will generate a v0.7.0 CDI specification." ,
180
+ Destination : & opts .spec .allowAdditionalGIDs ,
181
+ },
172
182
}
173
183
174
184
return & c
@@ -273,6 +283,7 @@ func (m command) generateSpec(opts *options) (spec.Interface, error) {
273
283
nvcdi .WithLibrarySearchPaths (opts .librarySearchPaths .Value ()),
274
284
nvcdi .WithCSVFiles (opts .csv .files .Value ()),
275
285
nvcdi .WithCSVIgnorePatterns (opts .csv .ignorePatterns .Value ()),
286
+ nvcdi .WithAllowAdditionalGIDs (opts .spec .allowAdditionalGIDs ),
276
287
)
277
288
if err != nil {
278
289
return nil , fmt .Errorf ("failed to create CDI library: %v" , err )
You can’t perform that action at this time.
0 commit comments