forked from BerkeleyAutomation/dex-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
113 lines (96 loc) · 2.06 KB
/
install.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
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
#!/bin/sh
# read cmd line inputs
VERSION=$1 # cpu or gpu
MODE=$2 # python or ros
# set cpu/gpu conditional libraries
case "${VERSION}"
in
cpu)
TENSORFLOW_LIB=tensorflow
;;
gpu)
TENSORFLOW_LIB=tensorflow-gpu
;;
*)
echo "Usage: $0 {cpu|gpu} {python|ros}"
exit 1
esac
echo "Installing Dex-Net in ${MODE} mode with ${VERSION} support"
# set workspace
case "${MODE}"
in
python)
MODULES_DIR=deps # installs modules in deps folder
;;
ros)
MODULES_DIR=../ # installs in catkin workspace
;;
*)
echo "Usage: $0 {cpu|gpu} {python|ros}"
exit 1
esac
# install apt deps
sudo apt-get install cmake libvtk5-dev python-vtk python-sip python-qt4 libosmesa6-dev meshlab libhdf5-dev
# install pip deps
pip install numpy scipy scikit-learn scikit-image opencv-python pyassimp tensorflow h5py mayavi matplotlib catkin_pkg multiprocess dill cvxopt ipython pillow pyhull setproctitle trimesh
# install deps from source
mkdir deps
cd deps
# install SDFGen
git clone https://github.com/jeffmahler/SDFGen.git
cd SDFGen
sudo sh install.sh
cd ..
# install Boost.NumPy
git clone https://github.com/jeffmahler/Boost.NumPy.git
cd Boost.NumPy
sudo sh install.sh
cd ..
# return to dex-net directory
cd ..
# install autolab modules
cd ${MODULES_DIR}
git clone https://github.com/BerkeleyAutomation/autolab_core.git
git clone https://github.com/BerkeleyAutomation/perception.git
git clone https://github.com/BerkeleyAutomation/gqcnn.git
git clone https://github.com/BerkeleyAutomation/meshpy.git
git clone https://github.com/BerkeleyAutomation/visualization.git
# install meshpy
cd meshpy
python setup.py develop
cd ../
# install all Berkeley AUTOLAB modules
case "${MODE}"
in
python)
# autolab_core
cd autolab_core
python setup.py develop
cd ..
# perception
cd perception
python setup.py develop
cd ..
# gqcnn
cd gqcnn
python setup.py develop
cd ..
# visualization
cd visualization
python setup.py develop
cd ..
cd ..
;;
ros)
# catkin
cd ..
catkin_make
source devel/setup.bash
cd src/dex-net
;;
*)
echo "Usage: $0 {cpu|gpu} {python|ros}"
exit 1
esac
# install dex-net
python setup.py develop