无法安装支持GPU的TensorFlow

时间:2016-11-11 20:10:50

标签: tensorflow cudnn

要在Ubuntu系统上安装带有GPU的TensorFlow,我使用" cuda-repo-ubuntu1404_8.0.44-1_amd64.deb"安装了CUDA v 8.0。和cuDNN使用" cudnn-8.0-linux-x64-v5.1"但是,在解压缩文件并将它们复制到CUDA工具包中时,以下文件被添加到/ usr / local / cuda / lib64文件夹中:

libcudnn.so  
libcudnn.so.5  
libcudnn.so.5.1.5  
libcudnn_static.a

以下是〜/ .profile文件

中的环境变量
LD_LIBRARY_PATH=/usr/local/cuda/lib64
CUDA_PATH=/usr/local/cuda

在tensorflow文件夹中运行./configure命令时,将显示以下错误:

ubuntu@ip-172-31-20-185:~/tensorflow$ ./configure
Please specify the location of python. [Default is /usr/bin/python]:
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] n
No Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with GPU support? [y/N] y
GPU support will be enabled for TensorFlow
Please specify which gcc nvcc should use as the host compiler. [Default is /usr/bin/gcc]:
Please specify the Cuda SDK version you want to use, e.g. 7.0. [Leave empty to use system default]: 8.0
Please specify the location where CUDA 8.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:
Invalid path to CUDA 8.0 toolkit. /usr/local/cuda/lib64/libcudart.so.8.0 cannot be found

我错过了任何步骤吗?任何帮助表示赞赏。

1 个答案:

答案 0 :(得分:0)

这可能是因为您的系统中安装了多个版本的 CUDA。 使用 sudo apt-get purge cuda-. 删除所有 CUDA 版本 安装 CUDA 8.0。

从此 link 下载 CUDA 工具包。安装本地 deb 文件。

在那之后运行

sudo apt-get update
sudo apt-get install cuda