Reputation: 7259
I am trying to make a table with all of the GPU enabled Azure VM SKUs, including all the corresponding VM stats (vCPU, RAM, GPU sizes, etc.), and I decided to use the Azure Rest API to build it for me. I'm using this API to get the information: https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list?tabs=HTTP
Unfortunately, I only get back the GPU count, not the GPU memory size. Is there a way to get the GPU memory size from the Azure Rest APIs? Or is there another programmatic lookup available to take the VM family and look up the GPU type? I could then build a separate table and do the calculations myself.
Here is a sample output from calling the API: https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus?api-version=2021-07-01
{
"locations": [
"eastus"
],
"capabilities": [
{
"name": "MaxResourceVolumeMB",
"value": "389120"
},
{
"name": "OSVhdSizeMB",
"value": "1047552"
},
{
"name": "vCPUs",
"value": "6"
},
...
{
"name": "GPUs",
"value": "1"
},
{
"name": "vCPUsPerCore",
"value": "1"
}
],
"locationInfo": [
{
"location": "eastus",
"zones": [
"useast-AZ01",
"useast-AZ02"
]
}
],
"name": "Standard_NV6",
"tier": "Standard",
"size": "NV6",
"family": "standardNVFamily"
}
Upvotes: 0
Views: 449
Reputation: 1402
you can create a dictionnaire of ressource / gpu size either manually from the azure documentation :
gpu_size = {"Standard_NC6s_v3":"16Go" , "Standard_NC12s_v3":"32Go" , "Standard_NC24s_v3":"64Go" , "Standard_NC24rs_v3*":"64Go"}
or using python like it's done in this post.
and after getting the dict you must match between the sku's and add the data to the main json.
Upvotes: 0