1、查看Ubuntu版本:
cat /etc/issue
结果:Ubuntu 16.04.3 LTS \n \l
2、查看cuda版本:
nvcc -V
结果:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Sep__4_22:14:01_CDT_2016
Cuda compilation tools, release 8.0, V8.0.44
3、查看cudnn版本:
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
结果:
define CUDNN_MAJOR 6
define CUDNN_MINOR 0
define CUDNN_PATCHLEVEL 21
原文:https://blog.csdn.net/zw__chen/article/details/78903839
Cuda9.0
下载 cuda 9.0 cuda 9.0
下载 cuda 10 cuda 10
cuda 9.0 安装 code
sudo chmod 777 cuda_8.0.61_375.26_linux.run # 型号要根据自己安装的替换
sudo ./cuda_8.0.61_375.26_linux.run
在 /etc/profile 中添加环境变量
sudo gedit /etc/profile
source /etc/profile
注意,~/.bashrc中的环境变量如下:
export PATH=\$PATH:/usr/local/cuda/bin
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/cuda/lib64
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda/lib64
配置文件生效:
source ~/.bashrc
原文:https://blog.csdn.net/u010821666/article/details/79957071
sudo rm –rf /usr/local/cuda
sudo ln -s /usr/local/cuda-9.0 /usr/local/cuda
cudnn 安装
配置cuDNN 首先在官网上(https://developer.nvidia.com/rdp/cudnn-archive)下载cudnn: NVIDIA cuDNN is a GPU-accelerated library of primitives for deep neural networks.
Download cuDNN v7.3.1 (Sept 28, 2018), for CUDA 10.0
Download cuDNN v7.3.1 (Sept 28, 2018), for CUDA 9.2
Download cuDNN v7.3.1 (Sept 28, 2018), for CUDA 9.0
Download cuDNN v7.3.0 (Sept 19, 2018), for CUDA 10.0
Download cuDNN v7.3.0 (Sept 19, 2018), for CUDA 9.0
Download cuDNN v7.2.1 (August 7, 2018), for CUDA 9.2
Download cuDNN v7.1.4 (May 16, 2018), for CUDA 9.2
Download cuDNN v7.1.4 (May 16, 2018), for CUDA 9.0
Download cuDNN v7.1.4 (May 16, 2018), for CUDA 8.0
Download cuDNN v7.1.3 (April 17, 2018), for CUDA 9.1
Download cuDNN v7.1.3 (April 17, 2018), for CUDA 9.0
Download cuDNN v7.1.3 (April 17, 2018), for CUDA 8.0
Download cuDNN v7.1.2 (Mar 21, 2018), for CUDA 9.1 & 9.2
Download cuDNN v7.1.2 (Mar 21, 2018), for CUDA 9.0
Download cuDNN v7.0.5 (Dec 11, 2017), for CUDA 9.1
Download cuDNN v7.0.5 (Dec 5, 2017), for CUDA 9.0
Download cuDNN v7.0.5 (Dec 5, 2017), for CUDA 8.0
Download cuDNN v7.0.4 (Nov 13, 2017), for CUDA 9.0
Download cuDNN v6.0 (April 27, 2017), for CUDA 8.0
下载cuDNN5.1之后切换到下载目录进行解压:
tar -zxvf ./cudnn-8.0-linux-x64-v5.1.tgz
进入cuDNN5.1解压之后的include目录,在命令行进行如下操作:
cd cuda/include
sudo cp cudnn.h /usr/local/cuda/include #复制头文件
再将进入lib64目录下的动态文件进行复制和链接:
cd ..
cd lib64
sudo cp lib* /usr/local/cuda/lib64/ #复制动态链接库
cd /usr/local/cuda/lib64/
sudo rm -rf libcudnn.so libcudnn.so.5 #删除原有动态文件
sudo ln -s libcudnn.so.5.1.10 libcudnn.so.5 #生成软衔接
sudo ln -s libcudnn.so.5 libcudnn.so #生成软链接
sudo ldconfig #使配置生效
(4)测试CUDA的samples
cd /usr/local/cuda-8.0/samples/1_Utilities/deviceQuery
sudo make
sudo ./deviceQuery
如果显示一些关于GPU的信息,怎说明安装成功。
可通过
nvcc --version
查看CUDA版本。
原文:https://blog.csdn.net/dihuanlai9093/article/details/79253963
tensorflow
版本匹配信息 tensorboard 是个以可以将神经网络可视化的tensorflow 的工具 以在线网络的形式显示。
conda --upgrade all
conda install tensorflow-gpu
conda install tensorboard
pytorch 安装
conda install pytorch=0.3.1 torchvision cuda90 -c pytorch
there always have some thing wrong with install 更换成清华镜像
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes