2017/5/26
#
環境
python = 3.6.0
cuda = 8.0
#
手順
1
2
|
% git clone https://github.com/pfnet/chainer.git
% export LD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-8.0/lib:$LD_LIBRARY_PATH
|
(とりあえず)
cudnnのライブラリをダウンロードする。https://developer.nvidia.com/cudnn (requires membership of the NVIDIA Developer Program)
1
2
3
|
% tar -xvf cudnn-8.0-osx-x64-v6.0.tar
% sudo cp cuda/lib/libcudnn* /Developer/NVIDIA/CUDA-8.0/lib/
% sudo cp cuda/include/cudnn.h /Developer/NVIDIA/CUDA-8.0/include/
|
1
2
|
% cd /Developer/NVIDIA/CUDA-8.0/bin
% sh cuda-install-samples-8.0.sh ~/workspace/chainer/
|
1
2
3
4
|
% pip3 install chainer
% python3
>>> import cupy
>>> import cupy.cudnn
|
1
2
3
4
|
% cd workspace/chainer/NVIDIA_CUDA-8.0_Samples
% make
% cd bin/x86_64/darwin/release
% ./smokeParticles
|
動けば成功
1
2
3
4
5
6
7
|
% cd chainer
% pip3 install -U setuptools
% python setup.py install
% pip3 install cython
% pip3 install matplotlib
% cd examples/mnist/
% python3 train_mnist.py -g 0
|
#
デバッグ
1
2
|
% pip3 install pdb
% python3 -m pdb train_mnist.py -g 0
|