-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall.sh
122 lines (96 loc) · 2.97 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
114
115
116
117
118
119
120
121
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "ERROR! Illegal number of parameters. Usage: bash install.sh conda_install_path environment_name"
exit 0
fi
conda_install_path=$1
conda_env_name=$2
source $conda_install_path/etc/profile.d/conda.sh
echo "****************** Creating conda environment ${conda_env_name} python=3.6 ******************"
conda create -y --name $conda_env_name python=3.6.9
echo ""
echo ""
echo "****************** Activating conda environment ${conda_env_name} ******************"
conda activate $conda_env_name
echo ""
echo ""
echo "****************** Installing pytorch with cuda9 ******************"
conda install -y cudatoolkit=9.0 torchvision pytorch=0.4.1 -c pytorch
echo ""
echo ""
echo "****************** Installing matplotlib 2.2.2 ******************"
conda install -y matplotlib=2.2.2
echo ""
echo ""
echo "****************** Installing pandas ******************"
conda install -y pandas
echo ""
echo ""
echo "****************** Installing opencv ******************"
pip install opencv-python
echo ""
echo ""
echo "****************** Installing tensorboardX ******************"
pip install tensorboardX
echo ""
echo ""
echo "****************** Installing cython ******************"
conda install -y cython
echo ""
echo ""
echo "****************** Installing coco toolkit ******************"
pip install pycocotools
echo ""
echo ""
echo "****************** Installing jpeg4py python wrapper ******************"
pip install jpeg4py
conda install -y tensorflow-gpu=1.9
conda install -y -c https://conda.binstar.org/menpo opencv
conda install -y scipy
conda install -y scikit-learn
pip install mmcv
cd mmdetection
echo "Building roi align op..."
cd mmdet/ops/roi_align
if [ -d "build" ]; then
rm -r build
fi
python setup.py build_ext --inplace
echo "Building roi pool op..."
cd ../roi_pool
if [ -d "build" ]; then
rm -r build
fi
python setup.py build_ext --inplace
echo "Building nms op..."
cd ../nms
make clean
python setup.py build_ext --inplace
echo "Building dcn..."
cd ../dcn
if [ -d "build" ]; then
rm -r build
fi
python setup.py build_ext --inplace
cd ../../../
pip install .
cd ../
echo ""
echo ""
echo "****************** Installing ninja-build to compile PreROIPooling ******************"
sudo apt-get install ninja-build
cd SiamMask/sm_utils/pyvotkit
python setup.py build_ext --inplace
cd ../../../
cd SiamMask/sm_utils/pysot/utils/
python setup.py build_ext --inplace
cd ../../../../
echo ""
echo ""
echo "****************** download Network ******************"
bash pytracking_MetricNet/pytracking/utils/gdrive_download 1g5j_3UFcjdb0dIizyU1HM0DZ29EuAZjW pytracking_MetricNet/pytracking/metricnet/metric_model.pt
cp pytracking_MetricNet/pytracking/metricnet/metric_model.pt MDNet_MetricNet/pyMDNet/models/metric_model.pt
bash pytracking_MetricNet/pytracking/utils/gdrive_download 1ISGB8j8Vs9JEFQtYSQHgup_sUxFfvp_z Train/model/dump/model.ckpt-470277.data-00000-of-00001
echo ""
echo ""
echo "****************** Installation complete! ******************"