File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
cmd/nvidia-ctk/cdi/generate Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ type options struct {
6060 files cli.StringSlice
6161 ignorePatterns cli.StringSlice
6262 }
63+
64+ // spec represents the CDI spec options.
65+ spec struct {
66+ allowAdditionalGIDs bool
67+ }
6368}
6469
6570// NewCommand constructs a generate-cdi command with the specified logger
@@ -169,6 +174,11 @@ func (m command) build() *cli.Command {
169174 Usage : "Specify a pattern the CSV mount specifications." ,
170175 Destination : & opts .csv .ignorePatterns ,
171176 },
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+ },
172182 }
173183
174184 return & c
@@ -273,6 +283,7 @@ func (m command) generateSpec(opts *options) (spec.Interface, error) {
273283 nvcdi .WithLibrarySearchPaths (opts .librarySearchPaths .Value ()),
274284 nvcdi .WithCSVFiles (opts .csv .files .Value ()),
275285 nvcdi .WithCSVIgnorePatterns (opts .csv .ignorePatterns .Value ()),
286+ nvcdi .WithAllowAdditionalGIDs (opts .spec .allowAdditionalGIDs ),
276287 )
277288 if err != nil {
278289 return nil , fmt .Errorf ("failed to create CDI library: %v" , err )
You can’t perform that action at this time.
0 commit comments