OpenNMT Forum

OpenNMT-tf - ImportError: libcublas.so.10.0

I have some Quetion…

command:

onmt-main train_and_eval
–model_type Transformer
–config data.yml --auto_config
–num_gpus 8

error

Traceback (most recent call last):
File “/data/home/chanjun_park/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “/data/home/chanjun_park/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “/data/home/chanjun_park/.local/lib/python3.6/site-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.6/imp.py”, line 243, in load_module
return load_dynamic(name, filename, file)
File “/usr/lib/python3.6/imp.py”, line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/data/home/chanjun_park/.local/bin/onmt-main”, line 7, in
from opennmt.bin.main import main
File “/data/home/chanjun_park/.local/lib/python3.6/site-packages/opennmt/init.py”, line 5, in
from opennmt import decoders
File “/data/home/chanjun_park/.local/lib/python3.6/site-packages/opennmt/decoders/init.py”, line 3, in
from opennmt.decoders.rnn_decoder import RNNDecoder
File “/data/home/chanjun_park/.local/lib/python3.6/site-packages/opennmt/decoders/rnn_decoder.py”, line 7, in
import tensorflow as tf
File “/data/home/chanjun_park/.local/lib/python3.6/site-packages/tensorflow/init.py”, line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File “/data/home/chanjun_park/.local/lib/python3.6/site-packages/tensorflow/python/init.py”, line 49, in
from tensorflow.python import pywrap_tensorflow
File “/data/home/chanjun_park/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py”, line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File “/data/home/chanjun_park/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “/data/home/chanjun_park/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “/data/home/chanjun_park/.local/lib/python3.6/site-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.6/imp.py”, line 243, in load_module
return load_dynamic(name, filename, file)
File “/usr/lib/python3.6/imp.py”, line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.10.0: 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.

Is there a solution?

You should install CUDA 10.

I install CUDA 10. But another error is occur.

Traceback (most recent call last):
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “/data/home/chanjun_park/.local/lib/python3.5/site-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: libcudnn.so.7: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/bin/onmt-main”, line 11, in
load_entry_point(‘OpenNMT-tf==1.23.0’, ‘console_scripts’, ‘onmt-main’)()
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/pkg_resources/init.py”, line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/pkg_resources/init.py”, line 2843, in load_entry_point
return ep.load()
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/pkg_resources/init.py”, line 2434, in load
return self.resolve()
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/pkg_resources/init.py”, line 2440, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/opennmt/init.py”, line 5, in
from opennmt import decoders
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/opennmt/decoders/init.py”, line 3, in
from opennmt.decoders.rnn_decoder import RNNDecoder
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/opennmt/decoders/rnn_decoder.py”, line 7, in
import tensorflow as tf
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/tensorflow/init.py”, line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/tensorflow/python/init.py”, line 49, in
from tensorflow.python import pywrap_tensorflow
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py”, line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “/data/home/chanjun_park/.local/lib/python3.5/site-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: libcudnn.so.7: 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.

Please read the documentation:

https://www.tensorflow.org/install/gpu#software_requirements