简体   繁体   English

专用 GPU 可以共享到多个 kubernetes 吊舱吗?

[英]can a dedicated GPU share to multiple kubernetes pods?

Is there a way we can share the GPU between multiple pods or we need some specific model of NVIDIA GPUS?有没有办法我们可以在多个 pod 之间共享 GPU,或者我们需要一些特定的 NVIDIA GPUS 的 model?

Short answer, yes:)简短的回答,是的:)

Long answer below:)下面的长答案:)

There is no "built-in" solution to achieve that, but you can use many tools (plugins) to control GPU.没有“内置”解决方案可以实现这一点,但您可以使用许多工具(插件)来控制 GPU。 First look at the Kubernetes official site :先看Kubernetes官网

Kubernetes includes experimental support for managing AMD and NVIDIA GPUs (graphical processing units) across several nodes. Kubernetes 包括对跨多个节点管理 AMD 和 NVIDIA GPU(图形处理单元)的实验性支持。

This page describes how users can consume GPUs across different Kubernetes versions and the current limitations.本页介绍了用户如何跨不同的 Kubernetes 版本和当前限制使用 GPU。

Look also about limitations:还要看看限制:

  • GPUs are only supposed to be specified in the limits section, which means: - You can specify GPU limits without specifying requests because Kubernetes will use the limit as the request value by default. GPU 只应在limits部分指定,这意味着: - 您可以在不指定requests的情况下指定 GPU limits ,因为 Kubernetes 将默认使用限制作为请求值。 - You can specify GPU in both limits and requests but these two values must be equal. - 您可以在limitsrequests中指定 GPU,但这两个值必须相等。 - You cannot specify GPU requests without specifying limits . - 您不能在没有指定limits的情况下指定 GPU requests
  • 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 的一小部分。

As you can see this supports GPUs between several nodes.如您所见,这支持多个节点之间的 GPU。 You can find the guide how to deploy it.您可以找到如何部署它的指南

Additionally, if you don't specify this in resource / request limits, the containers from all pods will have full access to the GPU as if they were normal processes.此外,如果您未在资源/请求限制中指定这一点,则来自所有 pod 的容器将拥有对 GPU 的完全访问权限,就像它们是正常进程一样。 There is no need to do anything in this case.在这种情况下不需要做任何事情。

For more look also at this github topic .有关更多信息,请参阅此 github 主题

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

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