In my previous post about ethereum mining on Ubuntu I ended by stating I wanted to look at what it would take to get NVIDIA’s CUDA drivers. Use of the CUDA drivers unlocks even further performance from my NVIDIA GTX 1070 graphics card in certain applications and specifically can demonstrate improvements while doing ethereum mining.
This post will demonstrate two methods of install for the CUDA drivers:
- Ubuntu package archive
- NVIDIA package archive
Ubuntu Package Archive
Install from the archive is extremely simple and quick. All that is required is to install the nvidia-cuda-toolkit package and it will also get all the required CUDA libraries and tools:
|
|
After rebooting, to verify that CUDA drivers are installed there are three ways to check that everything is up and running:
- Check that the nvidia* device files exist in /dev
- Use the nvcc command to show what version of the driver is installed
- Run nvidia-smi to get detailed version about the device like power and fan info, processes using the GPU, and driver versions.
Example output of all three is below:
|
|
NVIDIA Package Archive
This section will look to downloading the library directly from NVIDIA itself in order to get the latest version of the package. The NVIDIA repo also contains a variety of meta packages allowing an end-user to limit the install to the libraries, runtime, or the tool kits that are needed versus installing everything.
NVIDIA runs a repo which can be added to apt and then install directly from. Using this repo means the install will stay up-to-date. I will use the CUDA metapackage, which will install all CUDA toolkit and driver packages and upgrade both as new versions are released:
|
|
The final step, which is required is to modify your path to point at the binaries:
|
|
Test CUDA
Similar to installs from the archive below is output from /dev, nvcc, and nvidia-smi:
|
|
Additionally, the package comes with some additional scripts that are interesting to play with, found under /usr/local/cuda/extras/demo_suite
.
Device Query
|
|
Bandwidth Test
|
|