|
|
@@ -31,6 +31,8 @@ window.resizable(False,False)
|
|
31
|
31
|
def sshConnect(cs, sd):
|
|
32
|
32
|
cs = cs
|
|
33
|
33
|
sd = sd
|
|
|
34
|
+ filepath = './log.txt'
|
|
|
35
|
+
|
|
34
|
36
|
ssh = paramiko.SSHClient()
|
|
35
|
37
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
36
|
38
|
ssh.connect(settings[4],port= settings[3], username=settings[5], password=settings[6])
|
|
|
@@ -38,6 +40,11 @@ def sshConnect(cs, sd):
|
|
38
|
40
|
stdin, stdout, stderr = ssh.exec_command('mkdir ' + data_root_dir)
|
|
39
|
41
|
#TODO: 여기에 도커 명령어 및 동시 녹화 코드 입력
|
|
40
|
42
|
stdin, stdout, stderr = ssh.exec_command('docker run --rm --name mail_recorder --gpus 1 --privileged -v /dev:/dev -v /home/mc365/sources:/sources -v /home/mc365/data/'+cs+sd+':/data/'+cs+sd+' stereolabs/zed:3.5-gl-devel-cuda11.1-ubuntu18.04 python3 /sources/recorder.py')
|
|
|
43
|
+ f = open(filepath, 'w')
|
|
|
44
|
+ r_time = time.ctime(time.time())
|
|
|
45
|
+ f.write('record succesfully started at ' + str(r_time) + '\n')
|
|
|
46
|
+ f.close()
|
|
|
47
|
+
|
|
41
|
48
|
|
|
42
|
49
|
|
|
43
|
50
|
def sshQuit(cs, sd):
|
|
|
@@ -47,8 +54,9 @@ def sshQuit(cs, sd):
|
|
47
|
54
|
filepath = './log.txt'
|
|
48
|
55
|
data_root_dir = './data/'+cs+sd
|
|
49
|
56
|
|
|
50
|
|
- f = open(filepath, 'w')
|
|
51
|
|
- f.write('record succesfully stopped')
|
|
|
57
|
+ f = open(filepath, 'a')
|
|
|
58
|
+ r_time = time.ctime(time.time())
|
|
|
59
|
+ f.write('record succesfully stopped at ' + str(r_time))
|
|
52
|
60
|
f.close()
|
|
53
|
61
|
|
|
54
|
62
|
|