安装tensorflowGPU版本
2018-03-03 14:08
295 查看
ubuntu 16.0
# 安装cuda
## 安装
sudo dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb.deb
sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub #执行第一个命令后会有提示
sudo apt-get update
sudo apt-get install cuda
## 设置
sudo gedit ~/.bashrc
在末尾添加
export CUDA_HOME=/usr/local/cuda-9.0
#export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export PATH=/usr/local/cuda-9.0/bin:$PATH
保存退出。
然后刷新。
source ~/.bashrc
## 重启电脑并测试
执行命令
cat /proc/driver/nvidia/version
nvcc -V
1. The NVIDIA CUDA Toolkit includes sample programs in source form. You should compile them by changing to ~/NVIDIA_CUDA-9.1_Samples and typing make. The resulting binaries will be placed under ~/NVIDIA_CUDA-9.1_Samples/bin.
2. After compilation, find and run `deviceQuery` under` ~/NVIDIA_CUDA-9.1_Samples`. If the CUDA software is installed and configured correctly, the output for deviceQuery should look similar to that shown in Figure 1.
3. Running the `bandwidthTest` program ensures that the system and the CUDA-capable device are able to communicate correctly. Its output is shown in Figure 2.
Read more at: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ixzz58f8bhHpY Follow us: @GPUComputing on Twitter | NVIDIA on Facebook
# 安装cudnn
## 安装
下载相应的源码文件并解压
cudnn-9.0-linux-x64-v7.tgz
执行命令:
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h
sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
## 验证
参照文档
# 安装tensorflowGPU版本
使用conda创建python3.5环境
conda create -n tfGPU python=3.5
source activate tfGPU
pip install --ignore-installed --upgrade tensorflow_gpu-1.6.0-cp35-cp35m-linux_x86_64.whl
直接参照tensorflow官网
# 安装cuda
## 安装
sudo dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb.deb
sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub #执行第一个命令后会有提示
sudo apt-get update
sudo apt-get install cuda
## 设置
sudo gedit ~/.bashrc
在末尾添加
export CUDA_HOME=/usr/local/cuda-9.0
#export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export PATH=/usr/local/cuda-9.0/bin:$PATH
保存退出。
然后刷新。
source ~/.bashrc
## 重启电脑并测试
执行命令
cat /proc/driver/nvidia/version
nvcc -V
1. The NVIDIA CUDA Toolkit includes sample programs in source form. You should compile them by changing to ~/NVIDIA_CUDA-9.1_Samples and typing make. The resulting binaries will be placed under ~/NVIDIA_CUDA-9.1_Samples/bin.
2. After compilation, find and run `deviceQuery` under` ~/NVIDIA_CUDA-9.1_Samples`. If the CUDA software is installed and configured correctly, the output for deviceQuery should look similar to that shown in Figure 1.
3. Running the `bandwidthTest` program ensures that the system and the CUDA-capable device are able to communicate correctly. Its output is shown in Figure 2.
Read more at: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ixzz58f8bhHpY Follow us: @GPUComputing on Twitter | NVIDIA on Facebook
# 安装cudnn
## 安装
下载相应的源码文件并解压
cudnn-9.0-linux-x64-v7.tgz
执行命令:
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h
sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
## 验证
参照文档
# 安装tensorflowGPU版本
使用conda创建python3.5环境
conda create -n tfGPU python=3.5
source activate tfGPU
pip install --ignore-installed --upgrade tensorflow_gpu-1.6.0-cp35-cp35m-linux_x86_64.whl
直接参照tensorflow官网
相关文章推荐
- Anaconda下tensorflow-gpu的安装以及版本匹配
- Windows安装TensorFlow-GPU版本,主要麻烦在于下载资源了
- win10内置Linux子系统安装GPU版本TensorFlow
- windows下tensorflow-GPU版本安装
- windows10安装tensorflow的gpu版本(pip3安装方式)
- Windows10安装TensorFlow-GPU版本
- 亲测:在Ubuntu16.04上成功安装GPU版本的tensorflow
- Ubuntu 14.04 64bit 安装tensorflow(GPU版本)
- Win10下安装TensorFlow(GPU版本)
- tensorflow 安装GPU版本,个人总结,步骤比较详细
- ubuntu16.04下安装CUDA,cuDNN及tensorflow-gpu版本过程
- win10下基于python(anaconda)安装gpu版本的TensorFlow以及kears深度学习框架
- Ubuntu ,anaconda安装tensorflow最新GPU-1.0.0版本
- win10下安装TensorFlow-GPU版本
- Win10下安装GPU版本的tensorflow
- 【转】Ubuntu 16.04安装配置TensorFlow GPU版本
- Ubuntu安装Tensorflow GPU 版本和 CUDA Toolkit 9.1 和 cuDNN 7.0.5 for Python 3
- Windows下安装tensorflow GPU版本报错:OSError: [WinError 126] 找不到指定的模块/Could not find 'cudart64_90.dll'.
- tensorFlow的GPU版本的安装和试用