-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient-script.sh
executable file
·41 lines (32 loc) · 1.18 KB
/
client-script.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
original_pwd=`pwd`
if ! command -v virtualenv &> /dev/null
then
echo "Please install virtualenv. You can normally do this with pip."
exit
fi
# setup global virtual environment
# the requirements of each repository cloned will be added
virtualenv --python=python2.7 venv
source venv/bin/activate
# clone and setup visualisation tool
# cd = /
git clone https://github.com/pyvypr/VyPR-visualisation.git
cd VyPR-visualisation
pip install -r requirements.txt
# clone and setup test project
# cd = /VyPR-visualisation/
cd test-project
pip install -r requirements.txt
git clone https://github.com/pyvypr/VyPRLocal-py2.git VyPR
# cd into test-project, run instrumentation then run the program under monitoring
python VyPR/instrument.py
python main.py
sleep 2
verdict=`docker ps | grep 'verdict' | awk '{ print $1 }'`
echo $verdict
docker cp $original_pwd/VyPR-visualisation/test-project/module.py.inst $verdict:/VyPR-visualisation/test-project/
cd ..
# cd to VyPR-visualisation/src
cd src/
# setup visualisation tool launch alias
python launch.py --port 9001 --instrumentation-stream http://localhost:9003/event_stream/instrumentation/ --monitoring-stream http://localhost:9003/event_stream/monitoring/ &