ElderResearch / gpu_docker

dockerfiles for our dc office gpu development machine
4 stars 2 forks source link

importing tensorflow produces an error message #69

Closed geomex closed 5 years ago

geomex commented 5 years ago

Below is the error message I get when I try to import tensorflow. Not sure where to go from here:


ImportError: Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/usr/lib/python3.5/imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
semperstew commented 5 years ago

I was able to reproduce the error. This seems to only be happening when importing tensorflow inside a container with no gpus attached. Since the gpu and non-gpu images are exactly the same apart from the parameters passed when they are launched, I can only assume this is a result of a configuration in the launchapp.

semperstew commented 5 years ago

This issue was ultimately unrelated to tensorflow or the gpu images. The launch app was only using the nvidia runtime for containers with gpus attached. ElderResearch/gpu_launch_app@91b908a changed this behavior and now uses the nvidia runtime for all images.