1。 进入system setting --->software & updating ---> addtional driver --->安装Nvidia Driver(Nvidia GeForce GTX1060 GPU with 6GB VRAM最新驱动版本:387.62)
完成驱动安装后,重启系统
2。下载Cuda Toolkits,并根据官网的要求安装,完成后,重启系统。
3。下载cuDNN和cuda版本一致的运行库, 安装:
sudo dpkg -i XXXXXXXXX.deb
Install oder:
3.1 running library
3.2 developing library
3.3 code samples and cuDNN Library User Guide
3.4 Verifying the correct installation
Copy the cuDNN sample to a writable path.
$cp -r /usr/src/cudnn_samples_v7/ $HOME
Go to the writable path.
$ cd $HOME/cudnn_samples_v7/mnistCUDNN
Compile the mnistCUDNN sample.
$make clean && make
Run the mnistCUDNN sample.
$ ./mnistCUDNN
If cuDNN is properly installed and running on your Linux system, you will see a message similar to the following:
Test passed!
完成后,重启系统。
4。下载cuDNN和cuda版本一致的开发库, 安装:
install runtime library, then install developer library.
sudo dpkg -i XXXXXXXXX.deb
完成后,重启系统。
验证是否成功安装:
cat /usr/include/x86_64-linux-gnu/cudnn_v*.h | grep CUDNN_MAJOR -A 2
5。cuda运行环境设置:
5. 1 Create new file:
/etc/profile.d/cuda.sh
在文件中写入:
export PATH=$PATH:/usr/local/cuda/bin
export CUDADIR=/usr/local/cuda
5.2 产生新文件:
/etc/ld.so.conf.d/cuda.conf
在文件中写入:
/usr/local/cuda/lib64
5.3 运行:
sudo ldconfig
6。 进入虚拟环境,安装cupy
pip install cupy
完成玩装后,进入python, 测试上述安装是否成功:
import cupy as cp
import cupy.cudnn
x_gpu = cp.array([1, 2, 3])
l2_gpu = cp.linalg.norm(x_gpu)
如果上述没有错误,说明安装成功
7。安装 chainer 和chainercv
pip install chainer
pip install chainercv
网友评论