sudo nvidia-docker run -p 8888:8888 --name tf1.11_py3 -it -v /home/wang/:/home/wang 0641cda31e80
解决了下面问题:
>>> import tensorflow
Traceback (most recent call last):
File "
File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 22, in
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
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in
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
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
_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)
Tensorflow import 出错,ImportError: libcuda.so.1: cannot open shared object file: No such file or directory
启动docker时,原来使用的是:
sudo docker run -p 8888:8888 --name tf1.11_py2 -it -v /home//wang/:/home//wang 0641cda31e80
更改为
sudo nvidia-docker run -p 8888:8888 --name tf1.11_py3 -it -v /home/wang/:/home/wang 0641cda31e80