-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall-intelcaffe-centos.sh
49 lines (44 loc) · 1.36 KB
/
install-intelcaffe-centos.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
#Based on the Dockerfile: https://github.com/intel/caffe/blob/master/docker/standalone/cpu-centos/Dockerfile
rpm -iUvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y \
redhat-rpm-config \
tar \
findutils \
make \
gcc-c++ \
cmake \
git \
wget \
ssh \
atlas-devel \
boost-devel \
gflags-devel \
glog-devel \
hdf5-devel \
leveldb-devel \
lmdb-devel \
opencv-devel \
protobuf-devel \
snappy-devel \
protobuf-compiler \
freetype-devel \
libpng-devel \
python-devel \
python-numpy \
python-pip \
python-scipy \
gcc-gfortran \
libjpeg-turbo-devel
yum clean all
export CAFFE_ROOT=/opt/caffe
cd $CAFFE_ROOT
export CLONE_TAG=master
git clone -b ${CLONE_TAG} --depth 1 https://github.com/intel/caffe.git . && \
for req in $(cat python/requirements.txt) pydot; do pip --no-cache-dir install $req; done && \
mkdir build && cd build && \
cmake -DCPU_ONLY=1 -DCMAKE_BUILD_TYPE=Release .. && \
make all -j"$(nproc)"
export PYCAFFE_ROOT=$CAFFE_ROOT/python
export PYTHONPATH=$PYCAFFE_ROOT:$PYTHONPATH
export PATH=$CAFFE_ROOT/build/tools:$PYCAFFE_ROOT:$PATH
echo "$CAFFE_ROOT/build/lib" >> /etc/ld.so.conf.d/caffe.conf && ldconfig