Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the use of CDI on OpenShift #733

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Enable the use of CDI on OpenShift #733

wants to merge 2 commits into from

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants