[Solved] CUDA 8.0 on Ubuntu 16.04 - GPU not available
I'm trying to get CUDA 8.0 running on a new Ubuntu 16.04 box to be used with TensorFlow and Theano. For the most part I've been able to navigate through the install by sticking to NVIDIA's recommended setup - installing their device drivers, removing those from the Ubuntu package, etc. I now have CUDA and cuDNN installed, but both Theano and TensorFlow complain about no GPU being available. When I run `nvidia-smi`, though the device clearly exists. Any thoughts on this? I'm happy to post details on my configuration. This is with a new GTX 1080 Founders Edition, but I might try my old 750 if I continue to have issues. I'll also post any updates.
I'm trying to get CUDA 8.0 running on a new Ubuntu 16.04 box to be used with TensorFlow and Theano. For the most part I've been able to navigate through the install by sticking to NVIDIA's recommended setup - installing their device drivers, removing those from the Ubuntu package, etc. I now have CUDA and cuDNN installed, but both Theano and TensorFlow complain about no GPU being available.

When I run `nvidia-smi`, though the device clearly exists. Any thoughts on this?

I'm happy to post details on my configuration. This is with a new GTX 1080 Founders Edition, but I might try my old 750 if I continue to have issues. I'll also post any updates.

#1
Posted 05/31/2016 07:46 PM   
As a followup, it looks like there was a device driver incompatibility. Unfortunately it looks like the 16.04 Debian package on the NVIDIA website has a 361 driver dependency, and I want to use 367 (367.18). I'm going to try the run file instead. Stay tuned.
As a followup, it looks like there was a device driver incompatibility. Unfortunately it looks like the 16.04 Debian package on the NVIDIA website has a 361 driver dependency, and I want to use 367 (367.18). I'm going to try the run file instead. Stay tuned.

#2
Posted 05/31/2016 10:49 PM   
And once I installed with the run file (and *didn't* install the drivers this way) everything is working! I now have CUDA 8.0 running under TensorFlow and Theano.
And once I installed with the run file (and *didn't* install the drivers this way) everything is working! I now have CUDA 8.0 running under TensorFlow and Theano.

#3
Posted 05/31/2016 11:22 PM   
That's great! Are you using CuDNN v5? I'm about to try to reproduce your build.
That's great!

Are you using CuDNN v5? I'm about to try to reproduce your build.

#4
Posted 06/01/2016 04:18 PM   
Also, are you using the run files for both the 367 driver and Cuda 8?
Also, are you using the run files for both the 367 driver and Cuda 8?

#5
Posted 06/01/2016 04:56 PM   
Never mind, resolved.
Never mind, resolved.

#6
Posted 06/01/2016 07:48 PM   
orionr> And once I installed with the run file (and *didn't* install the drivers this way) So you installed Cuda 8 using the run file, correct? How did you install the 367 driver? Any help is appreciated.
orionr> And once I installed with the run file (and *didn't* install the drivers this way)

So you installed Cuda 8 using the run file, correct?

How did you install the 367 driver?

Any help is appreciated.

#7
Posted 06/08/2016 01:53 PM   
Here's what I've done and I'm pretty sure everything is working (recently, I've been getting artifacts on my screen, but I'm not 100% where that's coming from. My guess is the 367 beta drivers/maybe something I'm doing with TensorFlow as it only comes up once I start using the GPUs.) Current Setup: 2x GTX 1080, Ubuntu 16.04, 367.18 drivers, Cuda 8, cuDNN v5, TensorFlow r0.8 Steps: [olist] [.]Download cuda-8.run file[/.] [.]Download Nvidia-367.18-driver.run file[/.] [.]Remove old drivers (apt remove --purge nvidia*)[/.] [.]Remove old nvidia.deb packages (just in case that's necessary?)[/.] [.]Remove my cuda folders (/usr/local/cuda*) (again, just in case)[/.] [.]reboot[/.] [.]Graphics probably won't work now (they didn't for me), so use tty (ctrl-alt-1) or ssh (might want to set that up before doing all this)[/.] [.](I might have run the Nvidia-367.18.run file here, followed with a reboot, but I can't remember)[/.] [.]run the cuda-8.run file. Decline on installing the old drivers (362?) (I did this a few times, so I think that's what I did. :)[/.] [.]reboot[/.] [.]run the Nvidia-367.18.run file[/.] [.]reboot[/.] [/olist] Note: I didn't use any .debs At this point, the X session looked fine, and I was able to run normally / install the other software I wanted (cuDNN and TF). [b]Hopefully that helps!!![/b] Let me know how it goes.
Here's what I've done and I'm pretty sure everything is working (recently, I've been getting artifacts on my screen, but I'm not 100% where that's coming from. My guess is the 367 beta drivers/maybe something I'm doing with TensorFlow as it only comes up once I start using the GPUs.)

Current Setup:
2x GTX 1080, Ubuntu 16.04, 367.18 drivers, Cuda 8, cuDNN v5, TensorFlow r0.8

Steps:
  1. Download cuda-8.run file
  2. Download Nvidia-367.18-driver.run file

  3. Remove old drivers (apt remove --purge nvidia*)
  4. Remove old nvidia.deb packages (just in case that's necessary?)
  5. Remove my cuda folders (/usr/local/cuda*) (again, just in case)

  6. reboot
  7. Graphics probably won't work now (they didn't for me), so use tty (ctrl-alt-1) or ssh (might want to set that up before doing all this)
  8. (I might have run the Nvidia-367.18.run file here, followed with a reboot, but I can't remember)
  9. run the cuda-8.run file. Decline on installing the old drivers (362?) (I did this a few times, so I think that's what I did. :)
  10. reboot
  11. run the Nvidia-367.18.run file
  12. reboot

Note: I didn't use any .debs

At this point, the X session looked fine, and I was able to run normally / install the other software I wanted (cuDNN and TF).

Hopefully that helps!!! Let me know how it goes.

#8
Posted 06/08/2016 10:24 PM   
Excellent! Thank you very much for the details. Will try this and report back (probably have to wait for weekend). Thanks again for taking the time to spell out the steps.
Excellent! Thank you very much for the details.

Will try this and report back (probably have to wait for weekend).

Thanks again for taking the time to spell out the steps.

#9
Posted 06/09/2016 12:59 PM   
Nope....... Every time I install the 367.18 driver it crashes X11. Fastest way to crash: 1) Fresh install of Ubuntu 16.04 2) blacklist Nouveau 3) boot to terminal 4) install 367.18 (you can run xconfig or not, doesn't matter) 5) reboot Try to log in, keeps returning to log in prompt. BUT, I installed Linux Mint (Ubuntu 14.04) and it all seemed to work more smoothly. I'm up and running, installing libraries, fixing paths and links, etc. Thank you for your information, it was helpful. (P.S. You got *TWO* 1080's?? Dang.)
Nope.......

Every time I install the 367.18 driver it crashes X11.

Fastest way to crash:

1) Fresh install of Ubuntu 16.04
2) blacklist Nouveau
3) boot to terminal
4) install 367.18 (you can run xconfig or not, doesn't matter)
5) reboot

Try to log in, keeps returning to log in prompt.

BUT, I installed Linux Mint (Ubuntu 14.04) and it all seemed to work more smoothly. I'm up and running, installing libraries, fixing paths and links, etc.

Thank you for your information, it was helpful.

(P.S. You got *TWO* 1080's?? Dang.)

#10
Posted 06/12/2016 12:30 AM   
I have an ASUS K501U with a GeForce GTX 950M. It's one of those computers with the crazy Intel/NVIDIA graphics hybrids (displays through Intel, computes through NVIDIA or something like that). I am running Ubuntu Mate 16.04. jholloway's method seemed to work for my case. I can verify this is the process. [olist]Steps: [.]Download cuda-8.run file[/.] [.]Download Nvidia-367.18-driver.run file[/.] [.]Remove old drivers (apt remove --purge nvidia*)[/.] [.](Remove old cuda files (e.g. apt remove --purge libcuda*)[/.] [.]Remove old nvidia.deb packages (just in case that's necessary?)[/.] [.]Remove my cuda folders (/usr/local/cuda*) (again, just in case)[/.] [.]reboot[/.] [.]Run the Nvidia-367.18.run file [/.] [.]run the cuda-8.run file. Decline on installing the old drivers (361?) [/.] [.]reboot[/.] [/olist] After testing with the examples, 0_Simple/clock works fine, but I got an error with 5_Simulations/fluidsGL: [code]./fluidsGL: error while loading shared libraries: libcufft.so.8.0: cannot open shared object file: No such file or directory [/code] Oh, right. Update your LD_LIBRARY_PATH guys. :D Also, if you need to, update the /etc/ld.so.conf.d/cuda.conf with "/usr/local/cuda/lib" and 'sudo ldconfig'. After that, the CUDA part runs fine. (However, because of my funky dual graphics thing, I can't display the fluidsGL stuff, but that's a different problem entirely.)
I have an ASUS K501U with a GeForce GTX 950M. It's one of those computers with the crazy Intel/NVIDIA graphics hybrids (displays through Intel, computes through NVIDIA or something like that). I am running Ubuntu Mate 16.04. jholloway's method seemed to work for my case. I can verify this is the process.
    Steps:
  1. Download cuda-8.run file
  2. Download Nvidia-367.18-driver.run file
  3. Remove old drivers (apt remove --purge nvidia*)
  4. (Remove old cuda files (e.g. apt remove --purge libcuda*)
  5. Remove old nvidia.deb packages (just in case that's necessary?)
  6. Remove my cuda folders (/usr/local/cuda*) (again, just in case)
  7. reboot
  8. Run the Nvidia-367.18.run file
  9. run the cuda-8.run file. Decline on installing the old drivers (361?)
  10. reboot


After testing with the examples, 0_Simple/clock works fine, but I got an error with 5_Simulations/fluidsGL:
./fluidsGL: error while loading shared libraries: libcufft.so.8.0: cannot open shared object file: No such file or directory


Oh, right. Update your LD_LIBRARY_PATH guys. :D

Also, if you need to, update the /etc/ld.so.conf.d/cuda.conf with "/usr/local/cuda/lib" and 'sudo ldconfig'.

After that, the CUDA part runs fine.

(However, because of my funky dual graphics thing, I can't display the fluidsGL stuff, but that's a different problem entirely.)

# -*- coding: rot13 -*-
vzcbeg guvf

#11
Posted 06/22/2016 06:08 PM   
Thanks for all the followups! For the record jholloway's steps are exactly the same as those I went through in the end. Kudos for the details!
Thanks for all the followups! For the record jholloway's steps are exactly the same as those I went through in the end. Kudos for the details!

#12
Posted 06/25/2016 11:20 PM   
Hi - quick question about TF installation with CUDA 8... Did you need to do a custom build since there doesn't seem to be binaries for CUDA 8? I attempted a pip wheel custom build - everything compiled smoothly, but got an error once I tried installing: "tensorflow-0.8.0-py3-none-any.whl is not a supported wheel on this platform." Could this be because I'm still on Ubuntu 14.04?
Hi - quick question about TF installation with CUDA 8... Did you need to do a custom build since there doesn't seem to be binaries for CUDA 8?

I attempted a pip wheel custom build - everything compiled smoothly, but got an error once I tried installing: "tensorflow-0.8.0-py3-none-any.whl is not a supported wheel on this platform." Could this be because I'm still on Ubuntu 14.04?

#13
Posted 06/27/2016 11:00 PM   
@kbl424 , Did you try release 0.9 ? And were you able to install tensorflow?
@kbl424 , Did you try release 0.9 ? And were you able to install tensorflow?

#14
Posted 07/28/2016 12:22 PM   
I have CUDA 8 and TensorFlow 0.9 running on Ubuntu 16.04 with the NVIDIA Driver v367.27. You'll have to build TF from source to support the CUDA 8, but other than that it should be pretty straight forward. Note: If you've never built from source, it may take a while. I'm running a 12-core CPU at 3.5GHz, and it takes roughly 15 mins, so you can get a guess from there. (one nice thing about bazel is that it caches the build process along the way, so if you do hit an error, you don't have to start from scratch. :)
I have CUDA 8 and TensorFlow 0.9 running on Ubuntu 16.04 with the NVIDIA Driver v367.27.

You'll have to build TF from source to support the CUDA 8, but other than that it should be pretty straight forward.

Note: If you've never built from source, it may take a while. I'm running a 12-core CPU at 3.5GHz, and it takes roughly 15 mins, so you can get a guess from there. (one nice thing about bazel is that it caches the build process along the way, so if you do hit an error, you don't have to start from scratch. :)

#15
Posted 07/28/2016 03:28 PM   
Scroll To Top

Add Reply