Skip to content

Conversation

@cdesiniotis
Copy link
Contributor

No description provided.

This commit configures the toolkit container and device-plugin appropriately
so that CDI can be used to provide GPU access to both management and application
containers on OpenShift.

On OpenShift, we cannot set 'nvidia' as the default runtime. Because of this, we have
decided to take a hybrid approach for enabling CDI. That is, we use the 'nvidia' runtime
configured in CDI mode for providing GPU access to management containers, and native CDI
support in CRI-O for providing GPU access to application containers.

Signed-off-by: Christopher Desiniotis <[email protected]>
@xiongzubiao
Copy link

Glad to see the official CDI support on OpenShift. Just a side question: Why not always use cdi.k8s.io prefix rather than nvidia.cdi.k8s.io? Previously I thought nvidia runtime (cdi mode) needs it. But I tried to change the prefix to cdi.k8s.io in nvidia runtime's config.toml. It seems working fine (nvidia-cdi RuntimeClass with CRIO 1.31.0). Why does nvidia.cdi.k8s.io need to exist then...

// being used and CDI is not enabled. In this case, an OCI hook is used and the nvidia
// runtime is not configured.
func setRuntimeClass(podSpec *corev1.PodSpec, n ClusterPolicyController, runtimeClass string) {
if n.runtime == gpuv1.CRIO && !n.singleton.Spec.CDI.IsEnabled() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this enable for docker too?

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

This PR is stale because it has been open 90 days with no activity. This PR will be closed in 30 days unless new comments are made or the stale label is removed. To skip these checks, apply the "lifecycle/frozen" label.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 4, 2025
@cdesiniotis
Copy link
Contributor Author

Closing in favor of #1578

@cdesiniotis cdesiniotis closed this Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants