changed 8 years ago
Linked with GitHub

DDNN Install List

Environment

OS : Ubuntu 16.04 (desktop) 64-bits
CPU : Intel® Xeon® CPU E5-2650 v4 @ 2.20GHz * 48
GPU : TITAN Xp (GeForce GTX * Series)

(Note : Because DDNN based on Chainer-1.17.0, and called cudnn v5.1 for CUDA-8.0 library, so that the GPUs must be limited with Nvidia chips)

Driver

TITAN Xp
Other Nvidia GPU

Dependency

sudo apt-get install dkms build-essential linux-headers-generic

Runlevel

Mapping between runlevels and systemd targets
   ┌─────────┬───────────────────┐
   │Runlevel │ Target            │
   ├─────────┼───────────────────┤
   │0        │ poweroff.target   │
   ├─────────┼───────────────────┤
   │1        │ rescue.target     │
   ├─────────┼───────────────────┤
   │2, 3, 4  │ multi-user.target │
   ├─────────┼───────────────────┤
   │5        │ graphical.target  │
   ├─────────┼───────────────────┤
   │6        │ reboot.target     │
   └─────────┴───────────────────┘

Change to runlevel 4

sudo systemctl isolate multi-user.target sudo apt-get install build-essential gcc-multilib dkms

Remove Old Driver

sudo apt-get remove nvidia* && sudo apt autoremove sudo apt-get install dkms build-essential linux-headers-generic sudo vim /etc/modprobe.d/blacklist.conf

Insert follow lines to the blacklist.conf bottom :

blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
sudo update-initramfs -u sudo reboot

Install the Driver

sudo chmod +x $(your driver) sudo ./$(your driver)

All accept to install

If the error show as follow :

Check installed

nvidia-smi

Library

CUDA

CUDA 8.0 Toolkit

  • Download runfile source
chmod +x $(filename) sudo ./$(filename)
  • Ignore install Nvidia graphic driver option (n)
  • Other option accept (y)

(Note : Because Chainer-1.17.0 version use cudnn v5 library , and cudnn v5 is depended on CUDA-8.0)

cudnn

cudnn download page

  • Login Nvidia accunt(Join by yourself)
  • Select cudnn v5.1 (for CUDA 8.0) option
  • Download all the following option

==create symbolic link== tar -xzvf cudnn-8.0-linux-x64-v5.1.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 /usr/local/cuda/lib64/libcudnn* ==install runtime library== sudo dpkg -i libcudnn5_5.1.10-1+cuda8.0_amd64.deb sudo dpkg -i libcudnn5-dev_5.1.10-1+cuda8.0_amd64.deb sudo dpkg -i libcudnn5-doc_5.1.10-1+cuda8.0_amd64.deb

(Note : Because Chainer-1.17.0 based on cudnn v5.1 library)

Chainer

sudo apt-get install python-pip sudo pip install --upgrade pip sudo pip install -U setuptools sudo pip install cupy sudo pip install 'chainer==1.17.0'

Training test

wget https://github.com/chainer/chainer/archive/v1.17.0.tar.gz tar xzf v1.17.0.tar.gz cd chainer-1.17.0/examples/mnist/ python train_mnist.py --gpu=0

If the error message is CUDA Environment is not set up currently :

sudo pip uninstall chainer

And check the pip list without chainer package

sudo pip list

If the chainer package still exist please repeat the uninstall command until it uninstalled.
Reinstall chainer package and rebuild it

sudo pip install --no-cache-dir 'chainer==1.17.0'

DDNN

Dependency

sudo apt-get install python-sklearn sudo pip install scikit-learn sudo pip install --upgrade scikit-learn

Install

git clone https://gitlab.com/htkung/ddnn.git cd ddnn sudo python setup.py build sudo python setup.py install

Check

cd examples python simple.py


Select a repo