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
Copy file name to clipboardExpand all lines: articles/lab-services/class-type-jupyter-notebook.md
+48-1Lines changed: 48 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ Configure **Virtual machine size** and **Virtual machine image** settings as sho
37
37
| Virtual machine size | <p>The size you pick here depends on the workload you want to run:</p><ul><li>Small or Medium – good for a basic setup of accessing Jupyter Notebooks</li><li>Small GPU (Compute) – best suited for compute-intensive and network-intensive applications like Artificial Intelligence and Deep Learning</li></ul> |
38
38
| Virtual machine image | <p>Choose one of the following images based on your operating system needs:</p><ul><li>[Data Science Virtual Machine – Windows Server 2019](https://azuremarketplace.microsoft.com/marketplace/apps/microsoft-dsvm.dsvm-win-2019)</li><li>[Data Science Virtual Machine – Ubuntu 18.04](https://azuremarketplace.microsoft.com/marketplace/apps/microsoft-dsvm.ubuntu-1804?tab=Overview)</li></ul> |
39
39
40
+
When you create a lab with the **Small GPU (Compute)** size, you have the option to [Install GPU drivers](./how-to-setup-lab-gpu.md#ensure-that-the-appropriate-gpu-drivers-are-installed). This option installs recent NVIDIA drivers and Compute Unified Device Architecture (CUDA) toolkit which are required to enable high-performance computing with the GPU. For more information, see the article [Set up a lab with GPU virtual machines](./how-to-setup-lab-gpu.md).
40
41
41
42
### Template virtual machine
42
43
Once you create a lab, a template VM will be created based on the virtual machine size and image you chose. You configure the template VM with everything you want to provide to your students for this class. To learn more, see [how to manage the template virtual machine](how-to-create-manage-template.md).
@@ -46,6 +47,53 @@ The Data Science VM images by default come with many of data science frameworks
46
47
-[Jupyter Notebooks](http://jupyter-notebook.readthedocs.io/): A web application that allows data scientists to take raw data, run computations, and see the results all in the same environment. It will run locally in the template VM.
47
48
-[Visual Studio Code](https://code.visualstudio.com/): An integrated development environment (IDE) that provides a rich interactive experience when writing and testing a notebook. For more information, see [Working with Jupyter Notebooks in Visual Studio Code](https://code.visualstudio.com/docs/python/jupyter-support).
48
49
50
+
If you are using the **Small GPU (Compute)** size, we recommend that you verify that the Data Science frameworks and libraries are properly set up with the GPU. To properly set up the frameworks and libraries, you may need to install a different version of the NVIDIA Drivers and CUDA toolkit. For example, to validate that the GPU is configured for TensorFlow, you can connect to the template VM and run the following Python-TensorFlow code in Jupyter Notebooks:
51
+
52
+
```python
53
+
import tensorflow as tf
54
+
from tensorflow.python.client import device_lib
55
+
56
+
print(device_lib.list_local_devices())
57
+
```
58
+
59
+
If the output from the above code looks like the following, this means that the GPU isn't configured for TensorFlow:
60
+
61
+
```python
62
+
[name: "/device:CPU:0"
63
+
device_type: "CPU"
64
+
memory_limit: 268435456
65
+
locality {
66
+
}
67
+
incarnation: 15833696144144374634
68
+
]
69
+
```
70
+
To properly configure the GPU, you should consult the framework's or library's documentation. Continuing with the above example, TensorFlow provides the following guidance:
Their guidance covers the required version of the [NVIDIA drivers](https://www.nvidia.com/drivers) and [CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit-archive). Their guidance also includes installing the [NVIDIA CUDA Deep Neural Network library (cudDNN)](https://developer.nvidia.com/cudnn).
74
+
75
+
After you've followed TensorFlow's steps to configure the GPU, when you rerun the above code, you should see output similar to the following:
76
+
77
+
```python
78
+
[name: "/device:CPU:0"
79
+
device_type: "CPU"
80
+
memory_limit: 268435456
81
+
locality {
82
+
}
83
+
incarnation: 15833696144144374634
84
+
, name: "/device:GPU:0"
85
+
device_type: "GPU"
86
+
memory_limit: 11154792128
87
+
locality {
88
+
bus_id: 1
89
+
links {
90
+
}
91
+
}
92
+
incarnation: 2659412736190423786
93
+
physical_device_desc: "device: 0, name: NVIDIA Tesla K80, pci bus id: 0001:00:00.0, compute capability: 3.7"
94
+
]
95
+
```
96
+
49
97
### Provide notebooks for the class
50
98
The next task is to provide students with notebooks that you want them to use. To provide your own notebooks, you can save notebooks locally on the template VM.
51
99
@@ -124,7 +172,6 @@ Now, to connect to the VM, follow these steps:
124
172
2. Enter the password to connect to the VM. (You may have to give X2Go permission to bypass your firewall to finish connecting.)
125
173
3. You should now see the graphical interface for your Ubuntu Data Science VM.
126
174
127
-
128
175
#### SSH tunnel to Jupyter server on the VM
129
176
Some students may want to connect directly from their local computer directly to the Jupyter server inside their VMs. The SSH protocol enables port forwarding between the local computer and a remote server (in our case, the student’s lab VM), so that an application running on a certain port on the server is **tunneled** to the mapping port on the local computer. Students should follow these steps to SSH tunnel to the Jupyter server on their lab VMs:
Copy file name to clipboardExpand all lines: articles/lab-services/how-to-setup-lab-gpu.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,16 +42,19 @@ To take advantage of the GPU capabilities of your lab VMs, ensure that the appro
42
42
43
43

44
44
45
-
As shown in the preceding image, this option is enabled by default, which ensures that the *latest* drivers are installed for the type of GPU and image that you selected.
46
-
- When you select a *compute* GPU size, your lab VMs are powered by the [NVIDIA Tesla K80](https://www.nvidia.com/content/dam/en-zz/Solutions/Data-Center/tesla-product-literature/Tesla-K80-BoardSpec-07317-001-v05.pdf) GPU. In this case, the latest [Compute Unified Device Architecture (CUDA)](http://developer.download.nvidia.com/compute/cuda/2_0/docs/CudaReferenceManual_2.0.pdf) drivers are installed, which enables high-performance computing.
47
-
- When you select a *visualization* GPU size, your lab VMs are powered by the [NVIDIA Tesla M60](https://images.nvidia.com/content/tesla/pdf/188417-Tesla-M60-DS-A4-fnl-Web.pdf) GPU and [GRID technology](https://www.nvidia.com/content/dam/en-zz/Solutions/design-visualization/solutions/resources/documents1/NVIDIA_GRID_vPC_Solution_Overview.pdf). In this case, the latest GRID drivers are installed, which enables the use of graphics-intensive applications.
45
+
As shown in the preceding image, this option is enabled by default, which ensures that recently released drivers are installed for the type of GPU and image that you selected:
46
+
- When you select a *compute* GPU size, your lab VMs are powered by the [NVIDIA Tesla K80](https://www.nvidia.com/content/dam/en-zz/Solutions/Data-Center/tesla-product-literature/Tesla-K80-BoardSpec-07317-001-v05.pdf) GPU. In this case, recent [Compute Unified Device Architecture (CUDA)](http://developer.download.nvidia.com/compute/cuda/2_0/docs/CudaReferenceManual_2.0.pdf) drivers are installed, which enables high-performance computing.
47
+
- When you select a *visualization* GPU size, your lab VMs are powered by the [NVIDIA Tesla M60](https://images.nvidia.com/content/tesla/pdf/188417-Tesla-M60-DS-A4-fnl-Web.pdf) GPU and [GRID technology](https://www.nvidia.com/content/dam/en-zz/Solutions/design-visualization/solutions/resources/documents1/NVIDIA_GRID_vPC_Solution_Overview.pdf). In this case, recent GRID drivers are installed, which enables the use of graphics-intensive applications.
48
+
49
+
> [!IMPORTANT]
50
+
> The **Install GPU drivers** option only installs the drivers when they aren't present on your lab's image. For example, the GPU drivers are already installed on the Azure marketplace's [Data Science image](../machine-learning/data-science-virtual-machine/overview.md#whats-included-on-the-dsvm). If you create a lab using the Data Science image and choose to **Install GPU drivers**, the drivers won't be updated to a more recent version. To update the drivers, you will need to manually install them as explained in the next section.
48
51
49
52
### Install the drivers manually
50
-
You might need to install a driver version other than the latest version. This section shows how to manually install the appropriate drivers, depending on whether you're using a *compute* GPU or a *visualization* GPU.
53
+
You might need to install a different version of the drivers than the version that Azure Lab Services installs for you. This section shows how to manually install the appropriate drivers, depending on whether you're using a *compute* GPU or a *visualization* GPU.
51
54
52
55
#### Install the compute GPU drivers
53
56
54
-
To manually install drivers for the compute GPU size, do the following:
57
+
To manually install drivers for the *compute* GPU size, do the following:
55
58
56
59
1. In the lab creation wizard, when you're [creating your lab](./how-to-manage-classroom-labs.md), disable the **Install GPU drivers** setting.
57
60
@@ -75,7 +78,7 @@ To manually install drivers for the compute GPU size, do the following:
75
78
76
79
#### Install the visualization GPU drivers
77
80
78
-
To manually install drivers for the visualization GPU size, do the following:
81
+
To manually install drivers for the *visualization* GPU sizes, do the following:
79
82
80
83
1. In the lab creation wizard, when you're [creating your lab](./how-to-manage-classroom-labs.md), disable the **Install GPU drivers** setting.
81
84
1. After your lab is created, connect to the template VM to install the appropriate drivers.
@@ -104,6 +107,8 @@ This section describes how to validate that your GPU drivers are properly instal
104
107
> [!IMPORTANT]
105
108
> The NVIDIA Control Panel settings can be accessed only for *visualization* GPUs. If you attempt to open the NVIDIA Control Panel for a compute GPU, you'll get the following error: "NVIDIA Display settings are not available. You are not currently using a display attached to an NVIDIA GPU." Similarly, the GPU performance information in Task Manager is provided only for visualization GPUs.
106
109
110
+
Depending on your scenario, you may also need to do additional validation to ensure the GPU is properly configured. Read the class type about [Python and Jupyter Notebooks](./class-type-jupyter-notebook.md#template-virtual-machine) that explains an example where specific versions of drivers are needed.
111
+
107
112
#### Linux images
108
113
Follow the instructions in the "Verify driver installation" section of [Install NVIDIA GPU drivers on N-series VMs running Linux](../virtual-machines/linux/n-series-driver-setup.md#verify-driver-installation).
0 commit comments