/
installation.txt
135 lines (115 loc) · 4.02 KB
/
installation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#Install sublime-text 3
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer
# Install pip
sudo apt-get install python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
#Ipython
sudo pip install ipython[all]
#Git
sudo apt-get install git
#Numpy
sudo pip install numpy
#Install Scipy
sudo apt-get install python python-dev libatlas-base-dev gcc gfortran g++
sudo pip install scipy
#Install Scikit-Image
sudo apt-get install libfreetype6-dev libpng12-dev
sudo pip install cython six matplotlib networkx pillow
sudo pip install scikit-image
#Pandas
sudo pip install numexpr bottleneck
sudo pip install pandas
#Gensim
sudo pip install gensim
# sklearn
sudo pip install scikit-learn
#Theano
sudo apt-get install libatlas3gf-base libatlas-dev python-dev
sudo pip install Theano
# FOR THEANO with MULTICORE BLAS
# http://deeplearning.net/software/theano/install_ubuntu.html#install-ubuntu
# remove openblas if you installed it
sudo apt-get remove libopenblas-base
# Download the development version of OpenBLAS
git clone git://github.com/xianyi/OpenBLAS
cd OpenBLAS
make FC=gfortran
sudo make PREFIX=/usr/local/ install
# Tell Theano to use OpenBLAS.
# This works only for the current user.
# Each Theano user on that computer should run that line.
echo -e "\n[blas]\nldflags = -lopenblas\n" >> ~/.theanorc
# add to ldconfig cache and check
ldconfig
ldconfig -p | grep openblas
## optionally install numpy based on new multithreading openblas
sudo pip uninstall scipy
sudo pip uninstall numpy
sudo apt-get remove python-scipy
sudo apt-get remove python-numpy
## THEN follow the tutorial to install python based on openblas
http://stackoverflow.com/questions/11443302/compiling-numpy-with-openblas-integration
#Decaf
sudo apt-get install mpich
git clone https://github.com/UCB-ICSI-Vision-Group/decaf-release.git
cd decaf-release
### Need to change configuration in decaf/layers/cpp/Makefile
#### delete "-Wl" in the file
python setup.py install
## Install Caffe without GPU
## Note : need to install protobuf from source or there will errors
#pre-requisits for caffe
sudo apt-get install libopenblas-dev
## opencv 2.4
sudo apt-get install libopencv-dev
## opencv 3.0, supported by caffe, see [link](http://rodrigoberriel.com/2014/10/installing-opencv-3-0-0-on-ubuntu-14-04/)
sudo apt-get install libleveldb-dev libsnappy-dev libboost-all-dev libhdf5-serial-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
tar -xvzf protobuf-2.6.1.tar.gz
cd protobuf-2.6.1/
sudo apt-get install autoconf
sudo apt-get install libtool
./autogen.sh
./configure
make check
sudo make install
sudo ldconfig
# install caffe
git clone https://github.com/BVLC/caffe.git
cd caffe
cp Makefile.config.example Makefile.config
## uncomment the line "# CPU_ONLY := 1" in Makefile.config, change it to openblas for better cpu performance - turn on `BLAS := open`
## turn on `USE_PKG_CONFIG := 1` if you use opencv3.0,
make all -j $(nproc)
make test
make runtest
cd python/
for req in $(cat requirements.txt); do sudo pip install $req; done
cd ..
## Open Makefile.config, change the path to arrayobject.h if necessary
sudo make pycaffe
# open .bashrc and add the following line
export PYTHONPATH=/path/to/caffe/python:$PYTHONPATH
# Install Torch
curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch
./install.sh # and enter "yes" at the end to modify your bashrc
source ~/.bashrc
## iTorch
sudo apt-get install libzmq3-dev libssl-dev python-zmq ## dependencies
git clone https://github.com/facebook/iTorch.git
cd iTorch
luarocks make
## Install packages for Torch
luarocks install nn
luarocks install nngraph
luarocks install image
## If you want to use GPU (make sure CUDA is installed)
luarocks install cutorch
luarocks install cunn
luarocks install loadcaffe # if you want to use models in Caffe