question

TaB-8489 avatar image
0 Votes"
TaB-8489 asked TimXu-2830 published

Sharing GPU between pods in AKS

Team,

I have hosted the aks with one node i.e. standard NC6 machine and it has 1 K80 GPU.

I’ve deployed rolling update with 2 replicas which spins 2 pods. By any chance, is it possible to share 1 gpu between these 2 pods. Does these pods shares gpu, if I remove this line from the yaml

 limits:
            nvidia.com/gpu: 1

Currently, due to some constraints buying a new node is little difficult.

Kindly help. I would really appreciate.

Thank you

azure-virtual-machinesazure-kubernetes-serviceazure-container-instances
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You can use third-party open source software to implement gpu share, such as Nano GPU.


0 Votes 0 ·

You can use third-party open source software to implement gpu share, such as Nano GPU.


0 Votes 0 ·

1 Answer

prmanhas-MSFT avatar image
0 Votes"
prmanhas-MSFT answered ChiehWeiJerryLi-0460 commented

@TanulBhasin-0866 Apologies for delay in response and all the inconvenience caused because of the issue.

Graphical processing units (GPUs) are often used for compute-intensive workloads such as graphics and visualization workloads. AKS supports the creation of GPU-enabled node pools to run these compute-intensive workloads in Kubernetes

Currently AKS does not allow pods to share GPUs, you can have only as many replicas of a GPU-enabled web service as there are GPUs in the cluster.

You can find the same information here as well.

You can refer to this article as well which might be helpful to understand the use of GPU in AKS.

Hope it helps!!!

Do let me know in case of any more queries.

Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics




· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@prmanhas-MSFT, Thanks a lot for the reply. But tell me one thing let say if I buy 2 nodes and keep replica as 2. Does aks automatically deploy 1 pod per node or do I have to manually specify node selector and push 2 different yaml with keeping replica value as 1 in both yamls.

Please let me know this as well.

Thanks. Tk cr. 😊

0 Votes 0 ·

@TaB-8489 You can use Node Affinity. Please reference this document - assign-pods-nodes-using-node-affinity


0 Votes 0 ·