opendatahub-io-contrib / jupyterhub-singleuser-profiles

MIT License
11 stars 24 forks source link

Update GPU selection dropdown to only available GPUs #214

Closed VaishnaviHire closed 2 years ago

VaishnaviHire commented 2 years ago

This PR updates the get_gpu_number() function to return maximum available GPUs in any node.

VaishnaviHire commented 2 years ago

Worked well with total 2 GPUs , 1 on each node

 oc get nodes -l nvidia.com/gpu.machine
NAME                           STATUS   ROLES    AGE    VERSION
ip-10-0-164-195.ec2.internal   Ready    worker   104m   v1.22.3+ffbb954
ip-10-0-202-31.ec2.internal    Ready    worker   103m   v1.22.3+ffbb954
num_of_gpus