Skip to content

Commit 738ebd8

Browse files
author
Evan Lezar
committed
Merge branch 'fix-cdi-enable-docker' into 'main'
Fix --cdi.enabled for Docker See merge request nvidia/container-toolkit/container-toolkit!541
2 parents 9c6dd94 + f936f4c commit 738ebd8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
* Fix bug in determining default nvidia-container-runtime.user config value on SUSE-based systems.
1111
* Add `crun` to the list of configured low-level runtimes.
1212
* Added support for `--ldconfig-path` to `nvidia-ctk cdi generate` command.
13+
* Fix `nvidia-ctk runtime configure --cdi.enabled` for Docker.
1314

1415
* [toolkit-container] Bump CUDA base image version to 12.3.1.
1516

cmd/nvidia-ctk/runtime/configure/configure.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ func (m command) build() *cli.Command {
149149
},
150150
&cli.BoolFlag{
151151
Name: "cdi.enabled",
152+
Aliases: []string{"cdi.enable"},
152153
Usage: "Enable CDI in the configured runtime",
153154
Destination: &config.cdi.enabled,
154155
},
@@ -310,7 +311,7 @@ func enableCDI(config *config, cfg engine.Interface) error {
310311
case "containerd":
311312
cfg.Set("enable_cdi", true)
312313
case "docker":
313-
cfg.Set("experimental", true)
314+
cfg.Set("features", map[string]bool{"cdi": true})
314315
default:
315316
return fmt.Errorf("enabling CDI in %s is not supported", config.runtime)
316317
}

0 commit comments

Comments
 (0)