diff --git a/cmd/nvidia-container-runtime-hook/main.go b/cmd/nvidia-container-runtime-hook/main.go index faaf0b51..1f4bd525 100644 --- a/cmd/nvidia-container-runtime-hook/main.go +++ b/cmd/nvidia-container-runtime-hook/main.go @@ -95,6 +95,9 @@ func doPrestart() { if cli.LoadKmods { args = append(args, "--load-kmods") } + if hook.Features.DisableImexChannelCreation.IsEnabled() { + args = append(args, "--no-create-imex-channels") + } if cli.NoPivot { args = append(args, "--no-pivot") } diff --git a/internal/config/features.go b/internal/config/features.go index f92ca99e..80d3c95a 100644 --- a/internal/config/features.go +++ b/internal/config/features.go @@ -18,6 +18,9 @@ package config // features specifies a set of named features. type features struct { + // DisableImexChannelCreation ensures that the implicit creation of + // requested IMEX channels is skipped when invoking the nvidia-container-cli. + DisableImexChannelCreation *feature `toml:"disable-imex-channel-creation,omitempty"` } //nolint:unused