Skip to content

Instantly share code, notes, and snippets.

@MikimotoH
Last active November 2, 2017 05:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MikimotoH/5d67c161181a366aea9f5bbae44d28e8 to your computer and use it in GitHub Desktop.
Save MikimotoH/5d67c161181a366aea9f5bbae44d28e8 to your computer and use it in GitHub Desktop.
Build Deep Learning Environment on Ubuntu 16.04 (NVIDIA cuDNN and Microsoft CNTK)

Download Proprietary NVIDIA driver for "GeForce GTX 970"

wget NVIDIA-Linux-x86_64-384.90.run

disable nouveau driver

How to disable nouveau kernel driver on Ubuntu 16.04 [ https://askubuntu.com/a/868209/497162 ]

sudo vim /etc/modprobe.d/nvidia-graphics-drivers.conf
sudo vim  /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
sudo apt-get remove nvidia\*
sudo apt-get install dkms build-essential linux-headers-generic
sudo vim /etc/modprobe.d/blacklist.conf
echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf
sudo vim /etc/modprobe.d/nouveau-kms.conf
sudo update-initramfs -u
sudo reboot

install proprietary NVidia driver

sudo service lightdm stop
sudo sh NVIDIA-Linux-x86_64-384.90.run
nvidia-smi

Download and Install NVidia CUDA debian file

wget cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64.deb
sudo apt-key add /var/cuda-repo-<your-cuda-version>-local/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda

Download and install NVidia cuDNN

tar xvf cudnn-9.0-linux-x64-v7.tgz
cd cuda
sudo cp include/cudnn.h /usr/local/cuda/include/
sudo cp lib64/libcudnn* /usr/local/cuda/lib64/
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
sudo reboot

Anaconda 3 Python 3.5 create virutal environment for CNTK-2.2

conda create -n CNTKpy35 python=3.5 anaconda
source activate CNTKpy35
pip install https://cntk.ai/PythonWheel/GPU/cntk-2.2-cp35-cp35m-linux_x86_64.whl
ipython3
In [1]: import cntk as C

In [2]: print(C.__version__)
2.2

In [3]: C.device.try_set_default_device(C.device.gpu(0))
Out[3]: True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment