Skip to content

ouzoh/Deep-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Deep-Learning

Deep Learning Exploration

Software Setup

Build

  1. Motherboard Central Nervous System $80
  2. Case Skeleton $40
  3. Ram Short Term Memory like Pre-frontal Lobe $203
  4. CPU Brain: perform tasks $229
  5. Hard Drive 4T Long term memory like Hippocampus $130
  6. GTX 1070 Ti 8GB Eye: generate/compute output to display $499
  7. Power Supply Heart $77
  8. Heat Sink $30

Since this project is centred on fastai course, Ubuntu 16.04 LTS (Long Term Support) will be installed. This can be downloaded here

Install Ubuntu

  1. Create a bootable Ubuntu USB stick
  1. Press F11 and boot from stick
  2. Optional: boot directly to terminal
  3. If you get below error, check this answer:
No root file system is defined.
Please correct this from the partitioning menu.
  1. To jump to terminal if you notice any error.
Ctrl + Alt + F2

Ensure system is up to date and has basic build tools

sudo apt-get update
sudo apt-get --assume-yes upgrade
sudo apt-get --assume-yes install tmux build-essential gcc g++ make binutils
sudo apt-get --assume-yes install software-properties-common

Download and Install GPU Driver

See Install Nvidia driver for alternative resource.

wget "http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.44-1_amd64.deb" -O "cuda-repo-ubuntu1604_8.0.44-1_amd64.deb"
sudo dpkg -i cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
sudo apt-get update
sudo apt-get -y install cuda
sudo apt-get install cuda-toolkit-8.0
~~sudo modprobe nvidia~~
reboot
nvidia-smi

Install Anaconda

mkdir downloads
cd downloads
wget "https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh" -O "Anaconda2-4.2.0-Linux-x86_64.sh"
bash "Anaconda2-4.2.0-Linux-x86_64.sh" -b
echo "export PATH=\"$HOME/anaconda2/bin:\$PATH\"" >> ~/.bashrc
export PATH="$HOME/anaconda2/bin:$PATH"
conda install -y bcolz
conda upgrade -y --all

Create a virtual environment

pip install virtualenv
virtualenv --version
cd
mkdir -p Deep-Learning/fastai/
cd Deep-Learning/fastai/
virtualenv fastai
source fastai/bin/activate

Install theano

pip install theano
echo "[global]
device = gpu
floatX = float32

[cuda]
root = /usr/local/cuda" > ~/.theanorc

Install and Configure keras

pip install keras==1.2.2
mkdir ~/.keras
echo '{
    "image_dim_ordering": "th",
    "epsilon": 1e-07,
    "floatx": "float32",
    "backend": "theano"
}' > ~/.keras/keras.json

install cudnn libraries

wget "http://files.fast.ai/files/cudnn.tgz" -O "cudnn.tgz"
tar -zxf cudnn.tgz
cd cuda
sudo cp lib64/* /usr/local/cuda/lib64/
sudo cp include/* /usr/local/cuda/include/

configure jupyter

jupyter notebook --generate-config

Troubleshooting GPU Install

If you get below error:

The distribution-provided pre-install script failed!  
Are you sure you want to continue?

Try:

sudo update-initramfs -u

Then proceed with:

cd /Downloads
chmod +x NVIDIA-Linux-*-384.90.run
sudo sh NVIDIA-Linux-*-384.90.run

If you get below error:

ERROR: You appear to be running an X server; please exit X before installing.  
For further details, please see the section INSTALLING THE NVIDIA DRIVER in 
the README available on the Linux driver download page at www.nvidia.com.

https://unix.stackexchange.com/questions/25668/how-to-close-x-server-to-avoid-errors-while-updating-nvidia-driver
To stop:

sudo init 3

To resume:

sudo init 5

How to Find if Linux is Running on 32-bit or 64-bit? uname -a

uname -m

arch https://www.fastwebhost.in/blog/how-to-find-if-linux-is-running-on-32-bit-or-64-bit/

Resource for ins https://blog.slavv.com/the-1700-great-deep-learning-box-assembly-setup-and-benchmarks-148c5ebe6415

Releases

No releases published

Packages

No packages published

Languages