You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This tutorial shows you how to build a GPU-enabled virtual machine (VM). From the VM, you'll see how to run an IoT Edge device that allocates work from one of its modules to your GPU.
17
+
This tutorial shows you how to build a GPU-enabled virtual machine (VM). From the VM, yourun an IoT Edge device that allocates work from one of its modules to your GPU.
18
18
19
-
We'll use the Azure portal, the Azure Cloud Shell, and your VM's command line to:
19
+
Use the Azure portal, the Azure Cloud Shell, and your VM's command line to:
20
20
* Build a GPU-capable VM
21
21
* Install the [NVIDIA driver extension](/azure/virtual-machines/extensions/hpccompute-gpu-linux) on the VM
22
22
* Configure a module on an IoT Edge device to allocate work to a GPU
@@ -29,50 +29,50 @@ We'll use the Azure portal, the Azure Cloud Shell, and your VM's command line to
29
29
30
30
* Azure IoT Edge device
31
31
32
-
If you don't already have an IoT Edge device and need to quickly create one, run the following command. Use the [Azure Cloud Shell](../cloud-shell/overview.md)located in the Azure portal. Create a new device name for `<DEVICE-NAME>` and replace the IoT `<IOT-HUB-NAME>` with your own.
32
+
If you don't have an IoT Edge device and want to quickly create one, run the following command. Use the [Azure Cloud Shell](../cloud-shell/overview.md) in the Azure portal. Create a new device name for `<DEVICE-NAME>` and replace `<YOUR-IOT-HUB-NAME>` with your IoT hub name.
33
33
34
34
```azurecli
35
35
az iot hub device-identity create --device-id <YOUR-DEVICE-NAME> --edge-enabled --hub-name <YOUR-IOT-HUB-NAME>
36
36
```
37
37
38
-
For more information on creating an IoT Edge device, see [Quickstart: Deploy your first IoT Edge module to a virtual Linux device](quickstart-linux.md). Later in this tutorial, we'll add an NVIDIA module to our IoT Edge device.
38
+
For more information about creating an IoT Edge device, see [Quickstart: Deploy your first IoT Edge module to a virtual Linux device](quickstart-linux.md). Later in this article, you'll add an NVIDIA module to your IoT Edge device.
39
39
40
40
## Create a GPU-optimized virtual machine
41
41
42
-
To create a GPU-optimized virtual machine (VM), choosing the right size is important. Not all VM sizes accommodate GPU processing. In addition, there are different VM sizes for different workloads. For more information, see [GPU optimized virtual machine sizes](/azure/virtual-machines/sizes-gpu) or try the [Virtual machines selector](https://azure.microsoft.com/pricing/vm-selector/).
42
+
To create a GPU-optimized virtual machine (VM), choose the right size. Not all VM sizes support GPU processing, and different VM sizes work best for different workloads. For more information, see [GPU optimized virtual machine sizes](/azure/virtual-machines/sizes-gpu) or try the [Virtual machines selector](https://azure.microsoft.com/pricing/vm-selector/).
43
43
44
-
Let's create an IoT Edge VM with the [Azure Resource Manager (ARM)](../azure-resource-manager/management/overview.md) template in GitHub, then configure it to be GPU-optimized.
44
+
Create an IoT Edge VM with the [Azure Resource Manager (ARM)](../azure-resource-manager/management/overview.md) template in GitHub, then configure it to be GPU-optimized.
45
45
46
-
1. Go to the IoT Edge VM deployment template in GitHub:[Azure/iotedge-vm-deploy](https://github.com/Azure/iotedge-vm-deploy).
46
+
1. Go to the IoT Edge VM deployment template in GitHub at[Azure/iotedge-vm-deploy](https://github.com/Azure/iotedge-vm-deploy).
47
47
48
-
1. Select the **Deploy to Azure** button, which initiates the creation of a custom VM for you in the Azure portal.
48
+
1. Select the **Deploy to Azure** button to start creating a custom VM in the Azure portal.
49
49
50
-
1.Fill out the **Custom deployment** fields with your Azure credentials and resources:
50
+
1.Enter your Azure credentials and resource information in the **Custom deployment** fields:
| Subscription | Choose your Azure account subscription.|
55
55
| Resource group | Add your Azure resource group. |
56
56
| Region |`East US` <br> GPU VMs aren't available in all regions. |
57
57
| Dns Label Prefix | Create a name for your VM. |
58
-
| Admin Username |`adminUser` <br> Alternatively, create your own user name. |
58
+
| Admin Username |`adminUser` <br> Or create your own user name. |
59
59
| Device Connection String | Copy your connection string from your IoT Edge device, then paste here. |
60
60
| VM size |`Standard_NV6`|
61
-
| Authentication type | Choose either **password** or **SSH Public Key**, then create a password or key pair name if needed. |
61
+
| Authentication type | Choose **password** or **SSH Public Key**, then create a password or key pair name if needed. |
62
62
63
63
> [!TIP]
64
64
>
65
65
> Check which GPU VMs are supported in each region: [Products available by region](https://azure.microsoft.com/global-infrastructure/services/?regions=us-central,us-east,us-east-2,us-north-central,us-south-central,us-west-central,us-west,us-west-2,us-west-3&products=virtual-machines).
66
66
>
67
-
> To check [which region your Azure subscription allows](../azure-resource-manager/troubleshooting/error-sku-not-available.md?tabs=azure-cli#solution), try this Azure command from the Azure portal. The `N` in `Standard_N` means it's a GPU-enabled VM.
67
+
> To check [which region your Azure subscription allows](../azure-resource-manager/troubleshooting/error-sku-not-available.md?tabs=azure-cli#solution), try this Azure command in the Azure portal. The `N` in `Standard_N` means it's a GPU-enabled VM.
68
68
> ```azurecli
69
69
> az vm list-skus --location <YOUR-REGION> --size Standard_N --all --output table
70
70
> ```
71
71
72
-
1. Select the **Review + create** button at the bottom, then the **Create** button. Deployment can take up one minute to complete.
72
+
1. Select the **Review + create** button at the bottom, then select the **Create** button. Deployment can take up to one minute.
73
73
74
74
## Install the NVIDIA extension
75
-
Now that we have a GPU-optimized VM, let's install the [NVIDIA extension](/azure/virtual-machines/extensions/hpccompute-gpu-linux) on the VM using the Azure portal.
75
+
Now that you have a GPU-optimized VM, install the [NVIDIA extension](/azure/virtual-machines/extensions/hpccompute-gpu-linux) on the VM using the Azure portal.
76
76
77
77
1. Open your VM in the Azure portal and select **Extensions + applications** from the left menu.
78
78
@@ -96,7 +96,7 @@ Now that we have a GPU-optimized VM, let's install the [NVIDIA extension](/azure
96
96
sudo apt install nvidia-utils-515
97
97
```
98
98
99
-
Here's a list of all `nvidia-smi` versions. If you run `nvidia-smi` without installing it first, this list will print in your console.
99
+
Here's a list of all `nvidia-smi` versions. If you run `nvidia-smi` without installing it first, this list prints in your console.
100
100
101
101
:::image type="content" source="media/configure-connect-verify-gpu/nvidia-smi-versions.png" alt-text="Screenshot of all `nvidia-smi` versions.":::
102
102
@@ -105,13 +105,13 @@ Now that we have a GPU-optimized VM, let's install the [NVIDIA extension](/azure
105
105
```bash
106
106
nvidia-smi
107
107
```
108
-
109
-
A confirmation table will appear, similar to this table.
108
+
109
+
A confirmation table appears, similar to this table.
110
110
111
111
:::image type="content" source="media/configure-connect-verify-gpu/nvidia-driver-installed.png" alt-text="Screenshot of the NVIDIA driver table.":::
112
112
113
113
> [!NOTE]
114
-
> The NVIDIA extension is a simplified way to install the NVIDIA drivers, but you may need more customization. For more information about custom installations on N-series VMs, see [Install NVIDIA GPU drivers on N-series VMs running Linux](/azure/virtual-machines/linux/n-series-driver-setup).
114
+
> The NVIDIA extension is a simplified way to install the NVIDIA drivers, but you might need more customization. For more information about custom installations on N-series VMs, see [Install NVIDIA GPU drivers on N-series VMs running Linux](/azure/virtual-machines/linux/n-series-driver-setup).
115
115
116
116
## Enable a module with GPU acceleration
117
117
@@ -184,19 +184,19 @@ Let's add an [NVIDIA DIGITS](https://docs.nvidia.com/deeplearning/digits/index.h
184
184
185
185
1. Select the **Environment Variables** tab.
186
186
187
-
1. Add the environment variable name `NVIDIA_VISIBLE_DEVICES` with the value `0`. This variable controls which GPUs are visible to the containerized application running on the edge device. The `NVIDIA_VISIBLE_DEVICES` environment variable can be set to a comma-separated list of device IDs, which correspond to the physical GPUs in the system. For example, if there are two GPUs in the system with device IDs 0 and 1, the variable can be set to "NVIDIA_VISIBLE_DEVICES=0,1" to make both GPUs visible to the container. In this article, since the VM only has one GPU, we will use the first (and only) one.
187
+
1. Add the environment variable name `NVIDIA_VISIBLE_DEVICES` with the value `0`. This variable controls which GPUs are visible to the containerized application running on the edge device. The `NVIDIA_VISIBLE_DEVICES` environment variable can be set to a comma-separated list of device IDs, which correspond to the physical GPUs in the system. For example, if there are two GPUs in the system with device IDs 0 and 1, the variable can be set to "NVIDIA_VISIBLE_DEVICES=0,1" to make both GPUs visible to the container. In this article, since the VM only has one GPU, we'll use the first (and only) one.
188
188
189
189
| Name | Type | Value |
190
190
| :--------------------- | ---- | ----- |
191
191
| NVIDIA_VISIBLE_DEVICES | Text | 0 |
192
192
193
193
1. Select **Add**.
194
194
195
-
1. Select **Review + create**. Your deployment manifest properties will appear.
195
+
1. Select **Review + create**. Your deployment manifest properties appear.
196
196
197
197
1. Select **Create** to create the module.
198
198
199
-
1. Select **Refresh** to update your module list. The module will take a couple of minutes to show *running* in the **Runtime status**, so keep refreshing the device.
199
+
1. Select **Refresh** to update your module list. The module takes a couple of minutes to show *running* in the **Runtime status**, so keep refreshing the device.
200
200
201
201
1. From your device, run this command to confirm your new NVIDIA module exists and is running.
202
202
@@ -214,7 +214,7 @@ Let's add an [NVIDIA DIGITS](https://docs.nvidia.com/deeplearning/digits/index.h
214
214
215
215
If you want to continue with other IoT Edge tutorials, you can use the device that you created for this tutorial. Otherwise, you can delete the Azure resources that you created to avoid charges.
216
216
217
-
If you created your virtual machine and IoT hub in a new resource group, you can delete that group, which will delete all the associated resources. Double check the contents of the resource group to make sure that there's nothing you want to keep. If you don't want to delete the whole group, you can delete individual resources (virtual machine, device, or GPU-module) instead.
217
+
If you created your virtual machine and IoT hub in a new resource group, you can delete that group, which deletes all the associated resources. Double check the contents of the resource group to make sure that there's nothing you want to keep. If you don't want to delete the whole group, you can delete individual resources (virtual machine, device, or GPU-module) instead.
0 commit comments