1烂瘫。 進入system setting --->software & updating ---> addtional driver --->安裝Nvidia Driver(Nvidia GeForce GTX1060 GPU with 6GB VRAM最新驅(qū)動版本:387.62)
完成驅(qū)動安裝后欢瞪,重啟系統(tǒng)
2悄蕾。下載Cuda Toolkits腊凶,并根據(jù)官網(wǎng)的要求安裝涨共,完成后庐椒,重啟系統(tǒng)测暗。
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!
完成后碗啄,重啟系統(tǒng)质和。
4。下載cuDNN和cuda版本一致的開發(fā)庫稚字, 安裝:
install runtime library, then install developer library.
sudo dpkg -i XXXXXXXXX.deb
完成后饲宿,重啟系統(tǒng)。
驗證是否成功安裝:
cat /usr/include/x86_64-linux-gnu/cudnn_v*.h | grep CUDNN_MAJOR -A 2
5胆描。cuda運行環(huán)境設置:
5. 1 Create new file:
/etc/profile.d/cuda.sh
在文件中寫入:
export PATH=$PATH:/usr/local/cuda/bin
export CUDADIR=/usr/local/cuda
5.2 產(chǎn)生新文件:
/etc/ld.so.conf.d/cuda.conf
在文件中寫入:
/usr/local/cuda/lib64
5.3 運行:
sudo ldconfig
6瘫想。 進入虛擬環(huán)境,安裝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