Alex Lenail
Alex Lenail

Reputation: 14420

How to install CUDA 7.0 on elementaryOS (Ubuntu 14.04)

Trying to install tensorflow with GPU support on my desktop running elementaryOS Freya (which has Ubuntu 14.04 underneath). It's being really difficult.

Going the traditional route and using the package manager, it seems like the instructions are:

  1. Download CUDA 7.0 from the downloads page (.deb)
  2. If you open that .deb file, it opens the software center GUI. If you click 'install' it apparently installs but then I can't find the cuda files on my machine.

    $ which cuda-repo-ubuntu1404-7-0-local
    $ whereis cuda-repo-ubuntu1404-7-0-local
    cuda-repo-ubuntu1404-7-0-local: $ cd /usr/local $ ls bin etc games include lib man sbin share src $ cd bin/ $ ls iptest iptest2 ipython ipython2

  3. A lot of people recommend this three step process:

    sudo dpkg -i cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb
    sudo apt-get update
    sudo apt-get install cuda
    

but when I try it, I get:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  cuda-7-5 cuda-command-line-tools-7-5 cuda-core-7-5 cuda-cublas-7-5
  cuda-cublas-dev-7-5 cuda-cudart-7-5 cuda-cudart-dev-7-5 cuda-cufft-7-5
  cuda-cufft-dev-7-5 cuda-curand-7-5 cuda-curand-dev-7-5 cuda-cusolver-7-5
  cuda-cusolver-dev-7-5 cuda-cusparse-7-5 cuda-cusparse-dev-7-5
  cuda-documentation-7-5 cuda-driver-dev-7-5 cuda-drivers cuda-license-7-5
  cuda-misc-headers-7-5 cuda-npp-7-5 cuda-npp-dev-7-5 cuda-nvrtc-7-5
  cuda-nvrtc-dev-7-5 cuda-runtime-7-5 cuda-samples-7-5 cuda-toolkit-7-5
  cuda-visual-tools-7-5
The following NEW packages will be installed:
  cuda cuda-7-5 cuda-command-line-tools-7-5 cuda-core-7-5 cuda-cublas-7-5
  cuda-cublas-dev-7-5 cuda-cudart-7-5 cuda-cudart-dev-7-5 cuda-cufft-7-5
  cuda-cufft-dev-7-5 cuda-curand-7-5 cuda-curand-dev-7-5 cuda-cusolver-7-5
  cuda-cusolver-dev-7-5 cuda-cusparse-7-5 cuda-cusparse-dev-7-5
  cuda-documentation-7-5 cuda-driver-dev-7-5 cuda-drivers cuda-license-7-5
  cuda-misc-headers-7-5 cuda-npp-7-5 cuda-npp-dev-7-5 cuda-nvrtc-7-5
  cuda-nvrtc-dev-7-5 cuda-runtime-7-5 cuda-samples-7-5 cuda-toolkit-7-5
  cuda-visual-tools-7-5

Those are all version 7.5. And if I do the same again without the sudo apt-get update I get the same result. I need version 7.0 for Tensorflow. As far as I can tell the conversion from 7.0 to 7.5 was just magic.

  1. The other option is to install with the runfile, as in this tutorial. But when you get to the crucial step, of actually installing, I get this error because I'm logged in. This can be worked around with the solution that follows that question, except CNTL+ALT+F1 does nothing when I press them, so I can't open the TTY terminals. There doesn't seem to be another way to access TTYs. Either elementaryOS doesn't support those keystrokes or it's trying to be clever with my keyboard, which is an apple keyboard (F10, F11, and F12 control the volume, which elementary seems to get, meaning it might be doing something silly with all the F keys.

Help anywhere in this chain would be very helpful.

Upvotes: 2

Views: 1227

Answers (1)

Alex Lenail
Alex Lenail

Reputation: 14420

As @talonmies points out in the comments, the solution is to sudo apt-get install cuda-7-0. The documentation for this is very thin -- I wish I hadn't spent as long debugging this.

Upvotes: 1

Related Questions