Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Integrate NVIDIA GPU Cloud with Microsoft Azure

· 4 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Integrating NVIDIA GPU Cloud (NGC) with Microsoft Azure lets you deploy GPU-accelerated containers, models, and AI workloads directly on Azure virtual machines. This guide walks you through linking your NGC account to Azure, pulling NGC containers into Azure Container Registry, and running them on Azure GPU instances. You'll need an Azure subscription with GPU quota, an NGC account (free tier works), and the Azure CLI installed locally.

What You'll Need

  • An NVIDIA GPU Cloud account (sign up at ngc.nvidia.com)
  • An active Microsoft Azure subscription with GPU VM quota (e.g., NC, ND, NV series)
  • Azure CLI installed on your local machine (or use Azure Cloud Shell)
  • Docker installed locally (optional, for testing)
  • Basic familiarity with Azure Resource Manager and container registries

Step-by-Step

  1. Create an NGC account and get an API key. Go to ngc.nvidia.com, sign in, click your profile icon, select "Setup", then "Generate API Key". Copy the key—you'll use it to authenticate.
  2. Create an Azure Container Registry (ACR). In the Azure portal, search for "Container registries" and click "Create". Choose a resource group, registry name (globally unique), and a SKU (Standard is fine). Leave the rest default and create it.
  3. Log in to your ACR. Use the Azure CLI: az acr login --name . This authenticates Docker to your ACR.
  4. Pull an NGC container locally. For example, pull the PyTorch container: docker pull nvcr.io/nvidia/pytorch:24.01-py3. Replace the tag with a current one from NGC.
  5. Tag the container for your ACR. docker tag nvcr.io/nvidia/pytorch:24.01-py3 .azurecr.io/pytorch:24.01-py3.
  6. Push the container to ACR. docker push .azurecr.io/pytorch:24.01-py3. This makes the image available in Azure.
  7. Create a GPU VM in Azure. In the portal, create a new VM, choose a GPU size (e.g., NC6s v3, ND96asr v4). Ensure you have quota—if not, request a quota increase via "Help + support" > "New support request".
  8. Install the NVIDIA GPU driver on the VM. Connect via SSH, then run: az vm extension set --resource-group --vm-name --name NvidiaGpuDriverLinux --publisher Microsoft.HpcCompute --version 1.9. This installs the driver automatically.
  9. Deploy the container to the VM. SSH into the VM, then run: docker run --gpus all --shm-size=8g .azurecr.io/pytorch:24.01-py3. This pulls the image from ACR and runs it with GPU access.
  10. Verify GPU access. Inside the container, run nvidia-smi to confirm the GPU is visible and the driver is working.

Common Mistakes

  • Forgetting to request GPU quota—Azure doesn't allow GPU VMs by default; you must request it.
  • Using an outdated NGC container tag that no longer exists—always check the NGC catalog for current tags.
  • Not installing the NVIDIA driver on the VM—without it, containers won't see the GPU.
  • Pushing to ACR without logging in first—Docker will fail with an authentication error.
  • Using the wrong ACR login server format—it's yourregistry.azurecr.io, not the portal URL.

Tips

  • Use Azure Container Instances (ACI) with GPU support for quick testing instead of a full VM—it's simpler but costs more per hour.
  • Set up ACR tasks to automate image builds from NGC, so you don't have to pull/push manually.
  • Store your NGC API key in Azure Key Vault to avoid hardcoding it in scripts.
  • For production, use Azure Kubernetes Service (AKS) with a GPU node pool to scale containers.
  • Always use the --gpus all flag in Docker to expose all GPUs to the container.

Troubleshooting

  • Container fails with "could not select device driver"—this means the NVIDIA driver isn't installed or the nvidia-container-toolkit isn't set up. Re-run the extension command or manually install the toolkit on the VM.
  • Docker push fails with "unauthorized"—run az acr login again; your token may have expired.
  • VM creation fails with quota error—go to Azure portal > "Help + support" > "New support request" and request an increase for the specific GPU SKU.
  • nvidia-smi shows no GPU inside container—ensure you used --gpus all and that the host driver is installed. Reinstall the driver if needed.
  • Network issues pulling from NGC—NGC requires outbound internet; if you're behind a firewall, allow access to nvcr.io and its associated IP ranges.

Frequently Asked Questions

Do I need an NGC account to use NGC containers on Azure?

Yes, you need an NGC account to pull containers from nvcr.io. The free tier provides access to most public containers.

Can I use Azure Machine Learning instead of a raw VM?

Yes, Azure ML supports GPU compute clusters. You can attach an NGC container as a custom environment, but the integration steps differ slightly.

What GPU VM sizes are best for NGC workloads?

It depends on your workload. NC series for general compute, ND series for deep learning training, and NV series for visualization. Check Azure's documentation for current sizes.

How do I get a GPU quota increase?

In the Azure portal, create a support request under "Help + support", select "Quota", and specify the GPU VM series and region.

Can I use NGC on Azure without Docker?

NGC containers are Docker-based, but you can also use them with Kubernetes (AKS) or Azure Container Instances, which handle container orchestration for you.

Are there extra costs for using NGC with Azure?

NGC itself is free, but you pay for Azure resources (VM, storage, network) and any data egress. There are no additional NGC licensing fees for public containers.