forked from ConSurv/ThEmoBe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
how_to_run.txt
126 lines (76 loc) · 2.97 KB
/
how_to_run.txt
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
###########################################
Run using docker for the first time
###########################################
#docker pull waleedka/modern-deep-learning
#docker pull ufoym/deepo:cpu
docker pull kayathirim/deepo:fyp
docker images
docker images -a
docker run -d -it -p 5000:5000 <image_id>
docker ps
docker ps -a
-----------------------------------------
## now you can open as many terminals and run the following
-----------------------------------------
docker exec -it <container_id> bash
########################################
run these in 3 separate terminals
########################################
1st terminal - start flask backend
----------------------------------
python3 app.py
2nd terminal - run celery worker
--------------------------------
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
# nohup celery -A app.celery worker --pool gevent --loglevel=debug &
celery -A app.celery worker --pool gevent
#tail -f nohup.out
###########################################
Save a docker checkpoint by commiting
###########################################
exit
docker ps -a
docker commit <container_id> new_image_name:tag_name(optional)
###########################################
Docker exit the running detached container
###########################################
docker ps -a
docker stop <container_id>
###########################################
Run the previously exited container
###########################################
docker ps -a
docker start <container_id>
-----------------------------------------
## now you can open as many terminals and run the following
-----------------------------------------
docker exec -it <container_id> bash
###########################################
Load a previous docker commit in detached mode/ in background mode
###########################################
docker images
docker run -d -it -p 5000:5000 new_image_name:tag_name
-----------------------------------------
## now you can open as many terminals and run the following
-----------------------------------------
docker exec -it <container_id> bash
###########################################
Copy model weights to/from docker container
###########################################
docker cp <host_directory> <container_id>:<container_path>
From Windows to Container
docker cp /root/FYP_Model_weights/ f4a08fba2d31:/root/
From Container to Windows
docker cp f4a08fba2d31:/root/ /root/FYP_Model_weights/
docker run -it -p 8888:8888 -p 6006:6006 -v ~/:/host waleedka/modern-deep-learning
git clone https://github.com/AathmanT/ThEmoBe.git
cd ThEmoBe/
chmod +x setup.sh
./setup.sh
# For ssh connections(Optional)
# ssh -L 5000:localhost:5000 -t <username>@<server ip> -p <port> "cd /content/ThEmoBe/ ; bash"
# Example shown below
ssh [email protected] -p 17969
ssh -L 5000:localhost:5000 -t [email protected] -p 17969 "cd /content/ThEmoBe/ ; bash"
ssh -o "StrictHostKeyChecking no" -L 5000:localhost:5000 -t [email protected] -p 15517 "cd /content/ThEmoBe/ ; bash"