Last active
December 9, 2017 21:53
-
-
Save baraldilorenzo/5cce8087dbae098aa5a6 to your computer and use it in GitHub Desktop.
Install Caffe on Amazon EC2 g2.2xlarge instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Upgrade | |
sudo aptitude update | |
sudo aptitude full-upgrade -y | |
# Install CUDA | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_6.5-14_amd64.deb | |
sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb | |
sudo aptitude update | |
sudo aptitude install -y linux-image-extra-virtual | |
sudo aptitude install -y cuda # Takes a lot of time | |
echo 'export PATH=/usr/local/cuda/bin:$PATH' >> .bashrc | |
echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/lib:$LD_LIBRARY_PATH' >> .bashrc | |
source .bashrc | |
sudo reboot | |
# Caffe dependencies | |
sudo apt-get install libatlas-base-dev | |
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev | |
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler | |
# CuDNN | |
cd cuDNN # Replace with CuDNN path | |
sudo cpcudnn.h /usr/local/include | |
sudo cp *so* /usr/local/lib | |
sudo cp libcudnn_static.a /usr/local/lib | |
# Clone and install Caffe | |
sudo apt-get install git | |
git clone https://github.com/BVLC/caffe.git | |
cd caffe | |
cp Makefile.config.example Makefile.config | |
make all -j8 | |
make test -j8 | |
make runtest # Checks whether it's all OK |
But how about a CNN path?
I expect you are going to build a phenomenal product.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Small mistake
sudo cpcudnn.h /usr/local/include
->sudo cp cudnn.h /usr/local/include
?