generated from MONICA-Project/template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDeployment_requirements
executable file
·128 lines (103 loc) · 6.37 KB
/
Deployment_requirements
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
122
123
124
125
126
127
128
DRIVERS
1. Nvidia Driver. (should be already installed by supplier, https://youtu.be/TvH6CEDs-uI, check with nvidia-smi)
2. Nvidia CUDA & CuDNN. Follow https://medium.com/@zhanwenchen/install-cuda-and-cudnn-for-tensorflow-gpu-on-ubuntu-79306e4ac04e
H. Detailed Descriptions of the above two at bottom
GIT
1. Install git. sudo apt-get install git
2. Move to Home Dir. cd
3. Clone the FIT repo, KU_dev Branch. git clone -b KU_dev https://scm.fit.fraunhofer.de/scm/git/monica
MONICA VPN
1. Install OpenConnect software. sudo apt-get install network-manager-openconnect network-manager-openconnect-gnome
2. Install VPN reconnect Service. sudo cp VPN_reconnect.service /etc/systemd/system/
3. Check line 8 of the now copied VPN_reconnect.service (held in /etc/systemd/system/) points to the VPN_reconnect.sh in the MONICA dir. sudo nano /etc/systemd/system/VPN_reconnect.service
4. Move to the MONICA dir. cd monica
5. Make VPN_reconnect.sh executable. chmod +x VPN_reconnect.sh
6. Enable VPN_reconnect service to start on boot. sudo systemctl enable VPN_reconnect.service
7. Start VPN_reconnect service to connect to VPN. sudo systemctl start VPN_reconnect.service
8. Check VPN_reconnect service is active. systemctl status VPN_reconnect.service OR open connection information in the network manager
9. Install ssh on Server. sudo apt-get install openssh-server
H. Logging to the ssh of the processing node. ssh <USERNAME>@192.168.99.XXX
H. SFTP, Connect to Server (Files): sftp://<USERNAME>@192.168.99.XXX
H. Check status of VPN_reconnect service. systemctl status VPN_reconnect.service
H. Check VPN connection is active. nmcli con
MYSQL (TODO: THIS SHOULD BE MORE SECURE)
1. Install mysql, with username root and password root. https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-16-04
2. Start the service and ensure it starts on boot
3. Run DB initialisation. mysql -u root -p < monica/WP5/KU/SecurityFusionNodeService/mysql_setup_db.sql
H. Log into mysql bash. sudo mysql -u root -p
H. Check DBs have been created (after logging into mysql). SHOW DATABASES;
SCRAL CHECK
1. What is the address of the SCRAL and is processing node connect to required VPNs/Networks
2. Check connection to SCRAL. curl http://monappdwp3.monica-cloud.eu:8000/sfn
DOCKER
1a Install Docker CE. Follow https://docs.docker.com/install/linux/docker-ce/ubuntu/
1b Install Docker version sudo apt-get install docker-ce=18.03.1~ce-0~ubuntu
2. Move to the MONICA dir. cd monica
3. build docker SFN image. sudo docker build -f Dockerfile_sfn -t sfn .
4. Run the Docker Image. sudo docker run --net="host" -t sfn
5. Move to the MONICA dir. cd monica
6. Test with sfn_message_test.py. python3 WP5/KU/SecurityFusionNodeService/sfn_message_test.py --sfn_url 'http://0.0.0.0:5000/' --scral_url 'http://monappdwp3.monica-cloud.eu:8000/' --dataset_folder 'WP5/KU/Algorithms/algorithm_output/' --looping 'False' --threaded 'False'
7. Load test with sfn_message_test.py. python3 WP5/KU/SecurityFusionNodeService/sfn_message_test.py --sfn_url 'http://0.0.0.0:5000/' --scral_url 'http://monappdwp3.monica-cloud.eu:8000/' --dataset_folder 'WP5/KU/Algorithms/algorithm_output/' --looping 'True' --threaded 'True'
H. Check connection to local SFN. curl http://0.0.0.0:5000/
H. List docker images running. sudo docker ps
H. Re connect to a docker image that is already running. sudo docker attach $(sudo docker ps -q --filter ancestor=sfn)
H. Stop the docker image. sudo docker stop $(sudo docker ps -q --filter ancestor=sfn)
TEST ALGORITHMS WORK ON THE PROCESSING NODE
1. Move to the MONICA dir. cd monica
2. Install Requirements (don't upgrade pip3 to v10). sudo -H pip3 install -r WP5/KU/Algorithms/requirements.txt
3. From the root of the project git, test the flow. python3 WP5/KU/Algorithms/main.py --sequence 'WP5/KU/Algorithms/sample_sequence/' --config 'OXFORD' --algorithm 'flow'
4. From the root of the project git, test the density. python3 WP5/KU/Algorithms/main.py --sequence 'WP5/KU/Algorithms/sample_sequence/' --config 'OXFORD' --algorithm 'density'
H. For Error: 'No module named _tkinter'. sudo apt-get install python3-tk
H. If pip3 is not installed. sudo apt-get install python3-pip
RUNNING KU DEPLOYMENT TOOL
1. Move to the MONICA dir. cd monica
2. Install Requirements (don't upgrade pip3 to v10). sudo -H pip3 install -r <MONICA DIR>/WP5/KU/KUConfigTool/requirements.txt
3. From the root of the project git test the app. python3 WP5/KU/KUConfigTool/camera_config.py --seq_location '/<FULL MONICA DIR> /monica/WP5/KU/Algorithms/sample_sequence/'
4. Run the Config tool on a camera. python3 WP5/KU/KUConfigTool/camera_config.py --rtsp 'rtsp://root:pass@10.144.129.107/axis-media/media.amp'
5. Add all created configs to git in one add. git add WP5/KU/KUConfigTool/cam_configs/<PILOT_NAME>_*
6. Commit the files. git commit
7. Push them to the Repo. git push
H. For Error: 'No module named _tkinter'. sudo apt-get install python3-tk
H. Run the Config Tool on a Screenshot. python3 WP5/KU/KUConfigTool/camera_config.py --x_size '704' --y_size '576' --seq_location '/home/monica/monica_repo/monica/WP5/KU/KUConfigTool/175'
H. Install VLC Media Player. sudo apt-get install vlc
H. If pip3 is not installed. sudo apt-get install python3-pip
SPINNING UP VCA CORE
H. Start VCA Core. sudo systemctl start vca-core
H. Stop VCA Core. sudo systemctl stop vca-core
H. See status of VCA Core service. systemctl status vca-core
UTILITIES
1. Fix permissions. sudo chmod -R a+rwx /<MONICA DIR>/
DRIVERS & CUDA
CHECK GRAPHICS CARD AND COMPILERS
lspci | grep -i nvidia
uname -m && cat /etc/*release
gcc --version
sudo apt-get install linux-headers-$(uname -r)
DOWNLOAD CUDA FILES
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run
sudo chmod +x /home/<USER>/cuda_9.0.176_384.81_linux-run
TURN OFF nouveau DRIVERS
lsmod | grep nouveau
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0
sudo update-initramfs -u
REBOOT
INSTALL CUDA
sudo sh cuda_9.0.176_384.81_linux-run
DON'T INSTALL DRIVER
INSTALL ppa REPO
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
Open SOFTWARE AND UPDATES AND INSTALL NVIDIA DRIVERS THROUGH GUI
REBOOT
sudo bash -c "echo /usr/local/cuda/lib64/ > /etc/ld.so.conf.d/cuda.conf"
sudo ldconfig
sudo nano /etc/environment
ADD TO END: :/usr/local/cuda/bin
REBOOT
sudo reboot
cd /usr/local/cuda-9.0/samples
sudo make
cd /usr/local/cuda/samples/bin/x86_64/linux/release
./deviceQuery