简体   繁体   English

kube.netes 可以在 pod 之间共享单个 GPU 吗?

[英]Can kubernetes shared single GPU between pods?

Is there a possibility to share a single GPU between kube.netes pods?是否有可能在 kube.netes pod 之间共享一个GPU

As the official doc says正如官方文档所说

GPUs are only supposed to be specified in the limits section, which means: GPU 应该只在限制部分指定,这意味着:

You can specify GPU limits without specifying requests because Kubernetes will use the limit as the request value by default.您可以在不指定请求的情况下指定 GPU 限制,因为 Kubernetes 默认使用限制作为请求值。

You can specify GPU in both limits and requests but these two values must be equal.您可以在限制和请求中指定 GPU,但这两个值必须相等。

You cannot specify GPU requests without specifying limits.您不能在不指定限制的情况下指定 GPU 请求。 Containers (and pods) do not share GPUs .容器(和 Pod)不共享 GPU There's no overcommitting of GPUs.没有过度使用 GPU。

Each container can request one or more GPUs.每个容器可以请求一个或多个 GPU。 It is not possible to request a fraction of a GPU.请求 GPU 的一小部分是不可能的。

Also, you can follow this discussion to get a little bit more information.此外,您可以关注讨论以获取更多信息。

Yes, it is possible - at least with Nvidia GPUs.是的,这是可能的 - 至少使用 Nvidia GPU。

Just don't specify it in the resource limits/requests.只是不要在资源限制/请求中指定它。 This way containers from all pods will have full access to the GPU as if they were normal processes.这样,来自所有 pod 的容器将可以完全访问 GPU,就好像它们是正常进程一样。

是的,可以通过对调度程序进行一些更改,github 上有人好心地开源了他们的解决方案,请看这里: https : //github.com/AliyunContainerService/gpushare-scheduler-extender

Yes, you can use nano gpu for sharing gpu of nvidia.是的,你可以使用nano gpu共享 nvidia 的 gpu。

Official docs says pods can't request fraction of CPU.官方文档说 pod 不能请求 CPU 的一部分。 If you are running machine learning application in multiple pods then you have to look into kubeflow.如果您在多个 pod 中运行机器学习应用程序,那么您必须查看 kubeflow。 Those guys have solved this issue.那些人已经解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM