How to install CUDA on Ubuntu 19.10, to make use of an NVIDIA Tesla C2075 card
I have bought an Nvidia Tesla C2075 card, in order to try some deep learning and other data science stuff. Even though Nvidia tries very hard to make its products the most reliable on the market (and without any doubt they are), it have been with some issues to have Nvidia CUDA installed properly these days, on the latest Ubuntu. Of course, it is so mostly because the Tesla C2075 card is a fairly old one.
Meet the card :)
Installation
-
Get the latest Ubuntu installed via https://ubuntu.com/download
-
Afterwards, it would be helpful for one to navigate through directories in a terminal, if you had Midnight Commander installed. You can do it by the following command:
Now it is time to find out a compute capability of the card.
-
As per the section CUDA-Enabled Tesla Products of the https://developer.nvidia.com/cuda-gpus, a compute capability can be found, and it equals to 2.0 for the Tesla C2075 card.
-
Given the 2.0 compute capability, it can be found from the https://github.com/NVIDIA/nvidia-docker/wiki/CUDA (also the https://en.wikipedia.org/wiki/Nvidia_Tesla) that the most CUDA version can be as high as 8.0, because next successive versions of CUDA use different GPU architectures (Kepler and so on).
-
Check NVIDIA drivers have been installed:
-
Open Software Updater
-
Click on “Settings..”
-
Clicking on “Additional Drivers” tab you should see something like this:
It says that the card has been found and NVIDIA drivers are properly installed.
-
Go to https://developer.nvidia.com/cuda-toolkit-archive
-
Given that the card driver needs the 8.0 version of CUDA Toolkit, click on “CUDA Toolkit 8.0 GA2”, choose Linux, then x86_64, then Ubuntu, then 16.04 (don’t mind it for now), and choose run file (local).
-
Download the “Base Installer” and “Patch 2 (Released Jun 26, 2017)”
-
Install CUDA dependencies:
sudo apt-get install freeglut3 freeglut3-dev libxi-dev libxmu-dev
- Run these commands:
- Run “Base installer” using the following command (the flag ‘—override’ makes the CUDA installer bypass a compiler version check):
- You will be prompted for accepting or declining license:
- As well as you will be warned about an unsupported configuration:
- Then, you will have to decline the following offer (because you already have drivers installed, and not to say they are more recent):
- And the last answers:
-
After some time installation should be done.
-
Run the “Patch 2 (Released Jun 26, 2017)”:
- In order to install gcc version 5, do the following:
- Install gcc and g++ version 5:
-
Remove the last line from /etc/apt/sources.list and run updating packages again.
-
Make symbolic links to the compilers installed:
-
Run the ‘make’ make command inside the CUDA samples directory.
-
After the samples have got built, you may run (in the current directory) the following command, to get information about a NVIDIA Tesla card: