Using cloud GPUs: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 69: Line 69:


The GPU is now available within the user space and can be used.
The GPU is now available within the user space and can be used.
== Preparing a CentOS 7 Instance ==
Nvidia provides repositories for various distributions, therefore the required software can be installed and maintained via these repositories.
To compile the module sources from the nvidia repository, it is necessary to install dkms to automatically build the modules on kernel updates.
It ensures that the GPU is still working after OS updates, dkms is provided in the EPEL repository and additionally the kernel headers and the kernel source needs to be installed
before the nvidia driver can be set up.
===== <u>Enabling the EPEL repository and install needed software</u> =====
<pre>
[root@gpu-centos centos]# yum -y update && reboot
yum -y install epel-release && yum -y install dkms kernel-devel-$(uname -r) kernel-headers-$(uname -r)
</pre>
===== <u>Adding the NVIDIA repository and install the driver package</u> =====
<pre>
[root@gpu-centos centos]# yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo
yum install -y cuda-drivers
</pre>
Nvidia uses it's own gpg key to sign it's packages, yum will ask to autoimport it.
<pre>
Retrieving key from http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/7fa2af80.pub
Importing GPG key 0x7FA2AF80:
Userid    : "cudatools <cudatools@nvidia.com>"
Fingerprint: ae09 fe4b bd22 3a84 b2cc fce3 f60f 4b3d 7fa2 af80
From      : http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/7fa2af80.pub
Is this ok [y/N]: y
</pre>
After the installation a reboot is required to properly load the module and create the nvidia device files.
<pre>
[root@gpu-centos ~]# ls -al /dev/nvidia*
crw-rw-rw-. 1 root root 195,  0 Mar 10 20:35 /dev/nvidia0
crw-rw-rw-. 1 root root 195, 255 Mar 10 20:35 /dev/nvidiactl
crw-rw-rw-. 1 root root 195, 254 Mar 10 20:35 /dev/nvidia-modeset
crw-rw-rw-. 1 root root 241,  0 Mar 10 20:35 /dev/nvidia-uvm
crw-rw-rw-. 1 root root 241,  1 Mar 10 20:35 /dev/nvidia-uvm-tools
</pre>
The GPU is now accessible via any user space tool.
</translate>
</translate>
cc_staff
247

edits

Navigation menu