-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-caffe-required-packages.sh
50 lines (42 loc) · 1.67 KB
/
install-caffe-required-packages.sh
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
#!/bin/bash
#*****************************************************************#
# Automatically set up for building a RZG environment #
#*****************************************************************#
if [ ! -z $1 ] && ([ $1 = '-h' ] || [ $1 = '--help' ]); then
echo '
#*****************************************************************#
# Usage: #
# $ bash install-required-packages.sh #
#*****************************************************************#'
return 0 2>/dev/null || exit 0
fi
#### Pre-define functions for printing messages
function RUN {
# Convinient function to Echo and Run a command line
echo -e "${Yellow}$*${NC}"
$*
return $?
}
function INF {
echo -e " ${Light_Cyan}$*${NC}"
}
function ERR {
echo -e " ${Red}$*${NC}"
}
function COMMAND {
echo -e " ${Yellow}$*${NC}"
}
################################################
INF "Downloading and installing all necessary packages for Caffe"
IINFO "Step 1. Install dependencies"
RUN sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
RUN sudo apt-get install --no-install-recommends libboost-all-dev
RUN sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
RUN sudo apt-get install libatlas-base-dev
RUN sudo apt-get install libopenblas-dev
INFO "Step 2. Install Python dependencies"
RUN sudo -H pip install -U pip
RUN sudo apt-get install fort77 gfortran
RUN sudo apt-get install python-dev python-pip python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
INFO ""
INFO ""