我在 Debian 9.7(Dataproc)上安装了 Nvidia 驱动程序 9.1,当我尝试通过此测试脚本运行 TensorFlow 1.9 时失败:
使用本指南安装 GPU 驱动程序:https://cloud.google.com/dataproc/docs/concepts/compute/gpus
使用 pip install tensorflow-gpu
import tensorflow as tf
我得到:
>>> import tensorflow as tf
Traceback (most recent call last):
File "/opt/tony/TonY-samples/deps/tf-gpu/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/opt/tony/TonY-samples/deps/tf-gpu/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/opt/tony/TonY-samples/deps/tf-gpu/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 "/opt/tony/TonY-samples/deps/tf-gpu/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/opt/tony/TonY-samples/deps/tf-gpu/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
CUDA 版本
cat /usr/lib/cuda/version.txt
CUDA Version 9.1.85
TensorFlow(已尝试 1.9 和 1.12)
pip freeze
absl-py==0.7.0
astor==0.7.1
gast==0.2.2
grpcio==1.18.0
h5py==2.9.0
Keras-Applications==1.0.7
Keras-Preprocessing==1.0.9
Markdown==3.0.1
numpy==1.16.1
protobuf==3.6.1
six==1.12.0
tensorboard==1.12.2
tensorflow-gpu==1.12.0
termcolor==1.1.0
Werkzeug==0.14.1
Debian 版本
cat /etc/debian_version
9.7
我按照本指南安装了驱动程序:
遵循本指南:
如何在没有提示的情况下自动安装 CUDA 9.0 CUDNN 7.0?apt-get 没有 9.0
答案1
./cuda-linux.9.0.176-22781540.run --noprompt