Live data from Hacker News

Install GPU TensorFlow from Sources with Ubuntu 16.04 and Cuda 8.0 RC

alliseesolutions.wordpress.com

21–30 of 34 posts

Re: Install GPU TensorFlow from Sources with Ubuntu 16.04 and Cuda 8.0 RC

#21

Why does it just take following directions to make it to the front page of HN these days?

As stated elsewhere, this can actually be a very frustrating process. I lost a good chunk of my long weekend trying to build TF from source for CUDA 8.0 / cuDNN 5.1. Generally speaking the culprit is that the CUDA installers for Linux are highly dependent on your kernel and gcc versions. This is a huge headache for people who want to stay up-to-date on their distro packages. CentOS has no problem because hardly anything changes, but you're essentially handcuffed to whatever version s of Ubuntu or Fedora were out when NVIDIA decided to start packaging up the next release. Bumping gcc to 5.4 in Ubuntu 16.04.1 broke the 16.04 installer, which relied on gcc 5.3.

Re: Install GPU TensorFlow from Sources with Ubuntu 16.04 and Cuda 8.0 RC

#23
post #17

If using Docker is an option, the official Dockerfile works well, you just need to modify the FROM line to "nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04". Or "nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04", depending on which version of Ubuntu you want. https://github.com/tensorflow/tensorflow/blob/master/tensorf...

What sort of performance impact would Docker have in this situation? Any at all?

Edit: spelling

Re: Install GPU TensorFlow from Sources with Ubuntu 16.04 and Cuda 8.0 RC

#24
post #17

If using Docker is an option, the official Dockerfile works well, you just need to modify the FROM line to "nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04". Or "nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04", depending on which version of Ubuntu you want. https://github.com/tensorflow/tensorflow/blob/master/tensorf...

What sort of performance impact would Docker have in this situation? Any at all? Edit: spelling

No performance impact as long as your I/O is done in volumes, to avoid going through AUFS.

Re: Install GPU TensorFlow from Sources with Ubuntu 16.04 and Cuda 8.0 RC

#25
post #6

Thank you so much. I tried 3 times in the last week to get it working with Cuda 8.0

Have you actually succeeded yet in building a pip package linked with CUDA 8? I am doing basically the same process, and it only keeps failing. https://github.com/tensorflow/tensorflow/issues/2559#issueco...

The pip package doesn't build for me either. And I even reinstalled Ubuntu to get a fresh Python installation

Re: Install GPU TensorFlow from Sources with Ubuntu 16.04 and Cuda 8.0 RC

#26
post #25

Earlier quoted context omitted.

Have you actually succeeded yet in building a pip package linked with CUDA 8? I am doing basically the same process, and it only keeps failing. https://github.com/tensorflow/tensorflow/issues/2559#issueco...

The pip package doesn't build for me either. And I even reinstalled Ubuntu to get a fresh Python installation

So strange I wonder why its working for me? Ubuntu 16.04.1? Fresh install? following exactly? Python 3?

Re: Install GPU TensorFlow from Sources with Ubuntu 16.04 and Cuda 8.0 RC

#27
post #25

Earlier quoted context omitted.

The pip package doesn't build for me either. And I even reinstalled Ubuntu to get a fresh Python installation

So strange I wonder why its working for me? Ubuntu 16.04.1? Fresh install? following exactly? Python 3?

[deleted]

Re: Install GPU TensorFlow from Sources with Ubuntu 16.04 and Cuda 8.0 RC

#28
post #25

Earlier quoted context omitted.

The pip package doesn't build for me either. And I even reinstalled Ubuntu to get a fresh Python installation

So strange I wonder why its working for me? Ubuntu 16.04.1? Fresh install? following exactly? Python 3?

Which branch are you building?

For the first time I was able to complete a build last night, Ubuntu 16.04, CUDA 8.0 RC + compiler patch, cuDNN 5.1, nvidia-driver-370, python-2.7, and compute capability 6.1 (for Pascal GPU) - but only when I switched to the r0.10 branch.

With r0.10 I see none of the multiple failure modes that I always see with master. It just went straight ahead and compiled the whole thing.

Re: Install GPU TensorFlow from Sources with Ubuntu 16.04 and Cuda 8.0 RC

#29

This seems to be a frankenstein of cuda 7.5 instructions and cuda 8.0. Similarly ubuntu 14.04 and 16.04. As far as i know, these instructions will fail from gcc 5.4 errors, amongst other issues.

Wont GCC fail, includes a patch for GCC, I tested on my system before posting. Running great!

Ah, I see what I was missing before: there's a patch 1 of cuda 8.0, which adds gcc 5.4 support, and is installed in the cuda section using:

    sudo sh cuda_8.0.27.1_linux.run --silent --accept-eula

Re: Install GPU TensorFlow from Sources with Ubuntu 16.04 and Cuda 8.0 RC

#30

Earlier quoted context omitted.

Wont GCC fail, includes a patch for GCC, I tested on my system before posting. Running great!

Ah, I see what I was missing before: there's a patch 1 of cuda 8.0, which adds gcc 5.4 support, and is installed in the cuda section using: sudo sh cuda_8.0.27.1_linux.run --silent --accept-eula

Still doesnt work for me though: even on a new box, I get:

    ubuntu@somewhere:~/tensorflow$ python3 -c 'import tensorflow'             
    Traceback (most recent call last):
      File "", line 1, in 
      File "/home/ubuntu/tensorflow/tensorflow/__init__.py", line 23, in 
        from tensorflow.python import *
      File "/home/ubuntu/tensorflow/tensorflow/python/__init__.py", line 49, in 
        from tensorflow.python import pywrap_tensorflow
    ImportError: cannot import name 'pywrap_tensorflow'
Post reply on HN