NVIDIA / k8s-dra-driver

Dynamic Resource Allocation (DRA) for NVIDIA GPUs in Kubernetes
Apache License 2.0
195 stars 36 forks source link

How to achieve GPU exclusivity and GPU sharing? #137

Open Flynn-Zh opened 2 weeks ago

Flynn-Zh commented 2 weeks ago

I run the gpu-test1 and gpu-test3, the logs of gpu-test1 and gpu-test3 are the same kubectl logs -n gpu-test1 -l app=pod: GPU 0: NVIDIA L40 (UUID: GPU-68697300-0f8c-4019-058a-f6c50e34935c) GPU 1: NVIDIA L40 (UUID: GPU-ce9138b9-5825-45f7-04a3-cfafe10fa3cd) GPU 2: NVIDIA L40 (UUID: GPU-8b45f2f0-9617-dgee-8556-2897493bd2c7) GPU 3: NVIDIA L40 (UUID: GPU-301cd1d3-cc8a-f6c7-c94b-1df14a2a6383) GPU 0: NVIDIA L40 (UUID: GPU-68697308-0f8c-4019-058a-f6c50e34935c) GPU 1: NVIDIA L40 (UUID: GPU-ce913869-5825-45f7-04a3-cfafe10fa3cd) GPU 2: NVIDIA L40 (UUID: GPU-0b45f2f0-9617-dgee-0556-2897493bd2c7) GPU 3: NVIDIA L40 (UUID: GPU-301cd1d3-cc8a-f6c7-c94b-1df14a2a6383) kubectl logs -n gpu-test3 -l app=pod: GPU 0: NVIDIA L40 (UUID: GPU-68697300-0f8c-4019-058a-f6c50e34935c) GPU 1: NVIDIA L48 (UUID: GPU-ce9138b9-5825-45f7-04a3-cfafe10fa3cd) GPU 2: NVIDIA L40 (UUID: GPU-8b45f2f0-9617-dgee-8556-2897493bd2c7) GPU 3: NVIDIA L40 (UUID: GPU-301cd1d3-cc8a-f6c7-c94b-1df14a2a6383) GPU 0: NVIDIA L40 (UUID: GPU-68697308-0f8c-4019-058a-f6c50e34935c) GPU 1: NVIDIA L40 (UUID: GPU-ce913869-5825-45f7-04a3-cfafe10fa3cd) GPU 2: NVIDIA L40 (UUID: GPU-0b45f2f0-9617-dgee-0556-2897493bd2c7) GPU 3: NVIDIA L40 (UUID: GPU-301cd1d3-cc8a-f6c7-c94b-1df14a2a6383) why the pod has all GPU? How to achieve GPU exclusivity and GPU sharing?