Skip to content

Commit

Permalink
Merge branch 'fix-cdi-enable-docker' into 'main'
Browse files Browse the repository at this point in the history
Fix --cdi.enabled for Docker

See merge request nvidia/container-toolkit/container-toolkit!541
  • Loading branch information
Evan Lezar committed Jan 23, 2024
2 parents 9c6dd94 + f936f4c commit 738ebd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Fix bug in determining default nvidia-container-runtime.user config value on SUSE-based systems.
* Add `crun` to the list of configured low-level runtimes.
* Added support for `--ldconfig-path` to `nvidia-ctk cdi generate` command.
* Fix `nvidia-ctk runtime configure --cdi.enabled` for Docker.

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

Expand Down
3 changes: 2 additions & 1 deletion cmd/nvidia-ctk/runtime/configure/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ func (m command) build() *cli.Command {
},
&cli.BoolFlag{
Name: "cdi.enabled",
Aliases: []string{"cdi.enable"},
Usage: "Enable CDI in the configured runtime",
Destination: &config.cdi.enabled,
},
Expand Down Expand Up @@ -310,7 +311,7 @@ func enableCDI(config *config, cfg engine.Interface) error {
case "containerd":
cfg.Set("enable_cdi", true)
case "docker":
cfg.Set("experimental", true)
cfg.Set("features", map[string]bool{"cdi": true})
default:
return fmt.Errorf("enabling CDI in %s is not supported", config.runtime)
}
Expand Down

0 comments on commit 738ebd8

Please sign in to comment.