docker-ros-x11 icon indicating copy to clipboard operation
docker-ros-x11 copied to clipboard

CUDA 10.0 and Tensorflow 1.11 incompatibility

Open planetceres opened this issue 6 years ago • 3 comments

Why is the current Dockerfile being built with CUDA version 10.0 and Tensorflow 1.11? According to the Tensorflow docs, 1.11 is only compatible with CUDA 9:

https://www.tensorflow.org/install/source#tested_build_configurations

Running the container indeed results in an error indicating that tensorflow is looking for CUDA 9.0:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 22, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

planetceres avatar Feb 08 '19 21:02 planetceres

Thanks for reaching out. I'm going to fix it with Nvidia new build images nvidia/cudagl including CUDA and OpenGL. However the lowest version of CUDA is 9.2 with ubuntu 18.04. So I hope cuda 9.2 will work with Tensorflow, otherwise you might want to check out ROS-Kinetic branch.

henry2423 avatar Feb 09 '19 18:02 henry2423

My understanding is that in order for Tensorflow to be compatible with CUDA 9.2, it needs to be built from source. There is a suggestion on stackoverflow that renaming or linking the 9.2 library as a 9.0 library may work, but I didn't have success with either method.

planetceres avatar Feb 09 '19 22:02 planetceres

Base on the release notes from tensorflow, the newest version of tensorflow 1.13.0-rc1 is compatible with cuda 10.0. So I'm going to give it a shot see if it works with ubuntu 18.04/cuda 10.0.

henry2423 avatar Feb 12 '19 20:02 henry2423