OVH Guide

Deploy a GPU instance on Public Cloud

How to deploy a GPU instance on Public Cloud

Preamble

GPU instances share the specs of CPU instances in the 2017 offer, except they have a dedicated graphics card (GPU). The technology we use (pci_passthrough) allows the guest operating system to control the GPU just like on a physical server.

The GPUs we offer are Nvidia Geforce GTX 1060. Other models might be added later.

GPU instances are - for now - only available in GRA3. You might need to create a new Project and select the 2017 offer to be able to use them. See: docs/cloud/public-cloud/faq_how_to_understand_the_new_standardized_flavor_names/

Deployment

Linux

All our images can be used with GPU instances.

If you are not comfortable with kernel module compilation, we recommend you use a distribution that is supported by Nvidia: https://developer.nvidia.com/cuda-downloads

Start your instance using a GPU flavor (g1-15, g1-30...).

public-cloud

A few seconds later, our instance is built. We connect to the instance and check the GPU is there:

 ~  ssh ubuntu@217.182.83.88
 ubuntu@test-gpu:~$ lspci | grep -i nvidia
 00:05.0 VGA compatible controller: NVIDIA Corporation Device 1c03 (rev a1)
 00:06.0 Audio device: NVIDIA Corporation Device 10f1 (rev a1)
 ```
However, we can't use it yet. We need to install the Nvidia driver:

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.44-1_amd64.deb sudo dpkg -i cuda-repo-ubuntu1604_8.0.44-1_amd64.deb sudo apt-get update sudo apt-get upgrade sudo apt-get install cuda sudo reboot ``` After the reboot, we can see the GPU in Nvidia's utility:

``` ubuntu@test-gpu:~$ nvidia-smi Wed Apr 26 13:05:25 2017 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 375.51 Driver Version: 375.51 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 106... Off | 0000:00:05.0 Off | N/A | | 0% 22C P0 26W / 120W | 0MiB / 6072MiB | 0% Default | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | No running processes found | +-----------------------------------------------------------------------------+ ``` That's it, our instance is ready to use.

Windows

There are incompatibilities between Nvidia's driver and the virtualization technology KVM/pci_passthrough. Standard Windows images won't work.

We are providing special images, based on a UEFI BIOS, that allow the driver to work properly:

public-cloud

We can't be sure our solution will work with every future versions of the Nvidia driver. Our images come with a driver version that works with our GPUs. Before you update the Nvidia driver, we recommend you take snapshot, so you can rollback if there is any issue with the new driver.

Start your instance using a GPU flavor (win-g1-15, win-g1-30...)

A few minutes later, our instance is ready. After we set a password, we can see the Nvidia driver is already installed and the GPU is working properly:

public-cloud

public-cloud