Install CUDA 7.0 on Ubuntu 14.04.2

6,680

Solution 1

If you followed the nvidia tutorial you probably installed the proprietary drivers. I haven't had much luck with those, so here is a solution using the modified drivers. Make sure to remove any nvidia drivers or cuda installation before following these instructions.

Install the drivers:

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-XXX nvidia-prime

Restart your computer and make sure the drivers installed correctly. To check, install nvidia x server settings. If your gpu is found, this software will display information about your graphics card.

Next install the cuda toolkit from standard repository:

sudo apt-get install nvdia-cuda-toolkit

Then install the correct cuda library from the repository added earlier:

sudo apt-get install libcuda1-XXX
sudo add-apt-repository -r ppa:xorg-edgers/ppa

XXX in the above will depend on what graphics card you have (higher XXX means a newer driver). For me (I have an nvidia 970M) it was 346 (EDIT: this was the latest driver at the time, it's now 361. Most video cards will be compatible with the latest driver, but check the nvidia website to be safe).

Finally, try running deviceQuery (may have to run as sudo) to see if cuda is installed and finding your gpu.

Solution 2

Found this floating around on the web:

Install wget:

sudo apt-get install wget

Change to the temp directory:

cd /tmp

Download CUDA 7.0 repository:

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.0-28_amd64.deb

Install CUDA repository:

sudo dpkg -i cuda-repo-ubuntu1404_7.0-28_amd64.deb

Update the repository listings:

sudo apt-get update -y

Install CUDA 7.0:

sudo apt-get install cuda-toolkit-7-0 -y
Share:
6,680

Related videos on Youtube

Gabs
Author by

Gabs

~"If you are depressed, you are living in the past. If you are anxious, you are living in the future. If you are at peace, you are living in the present."~ - Lao Tzu

Updated on September 18, 2022

Comments

  • Gabs
    Gabs over 1 year

    I am trying to install CUDA 7.0 on Ubuntu 14.04.2. I already tried everything suggested here and here. I have also tried many other tutorials, which mostly, say the same things.

    The main problems when I try to install CUDA are:

    1. I get stuck on the login screen and nothing that I do can solve it. Already tried, among many other "solutions", this one.
    2. If I manage to install CUDA properly, Ubuntu freezes randomly and I am forced to shut it down or reinstall Ubuntu;

    Can somebody please help me? I already reinstalled Ubuntu more than 5 times...

    Thanks in advance,

    • rutsky
      rutsky almost 9 years
      What is your hardware configuration? Which graphics card do you have? Is your system is desktop, notebook or some kind of server? Have you installed nVidia drivers (in my experience most common source of hangs is Nouveau drivers)?
    • Gabs
      Gabs almost 9 years
      It is a notebook: Dell Vostro. GPU: GForce 760M. I did install all NVidia Drivers that are asked to, in the installation guide.
    • rutsky
      rutsky almost 9 years
      Which model of Dell Vostro do you have precisely? Does your notebook use nVidia optimus for switching between GPUs?
    • Gabs
      Gabs almost 9 years
      Notebook Vostro V14T-5470-A50
  • Shawn Le
    Shawn Le almost 8 years
    Hi @Msquared! I tried the command "apt-get install nvidia-cuda-toolkit" and saw that the driver I've just installed which is working fine will be replaced by a different one. The result is cuda toolkit is installed but driver is lost
  • Msquared
    Msquared almost 8 years
    Yah, I've noticed cuda often likes to install the latest driver when you install it. For some reason when there isn't already a driver installed this doesn't seem to work as well, but I haven't had any problems with it when I had a driver already installed and then replaced by cuda. Just check the nvidia website to make sure you GPU is compatible with the driver being installed. If so you should be fine.