Procházet zdrojové kódy

modify docker bash command

master
Jeong Geol Kim před 4 roky
rodič
revize
abcc6b28da
3 změnil soubory, kde provedl 12 přidání a 12 odebrání
  1. 3
    3
      auto_coordinate.py
  2. 4
    4
      auto_extract.py
  3. 5
    5
      auto_kpi.py

+ 3
- 3
auto_coordinate.py Zobrazit soubor

@@ -23,13 +23,13 @@ def main():
23 23
                 logs = f.readlines()
24 24
                 f.close()
25 25
                 if len(logs) == 4:
26
-                    f = open(file, 'ar')
26
+                    f = open(file, 'at')
27 27
                     r_time = time.ctime(time.time())
28 28
                     f.write('global coordinate successfully starts at ' + str(r_time) + '\n')
29 29
                     f.close()
30 30
                     #FIXME: change coordinate_g.py when IMU sensor works
31
-                    os.system('run --rm --name coordinate --gpus '"device=1"' -v /dev:/dev -v /home/mc365/sources:/sources -v /hdd:/hdd ellishuntingmoon/mailsys:0.4 python3 /sources/coordinate_g.py ' + id + '/ >> /dev/null')
32
-                    f = open(file, 'ar')
31
+                    os.system('docker run --rm --name coordinate --gpus '"device=1"' -v /dev:/dev -v /home/mc365/sources:/sources -v /hdd:/hdd ellishuntingmoon/mailsys:0.4 python3 /sources/coordinate_g.py ' + id + '/ >> /dev/null')
32
+                    f = open(file, 'at')
33 33
                     r_time = time.ctime(time.time())
34 34
                     f.write('global coordinate successfully ends at ' + str(r_time) + '\n')
35 35
                     f.close()

+ 4
- 4
auto_extract.py Zobrazit soubor

@@ -23,13 +23,13 @@ def main():
23 23
                 logs = f.readlines()
24 24
                 f.close()
25 25
                 if len(logs) == 2:
26
-                    f = open(file, 'ar')
26
+                    f = open(file, 'at')
27 27
                     r_time = time.ctime(time.time())
28 28
                     f.write('exectue is successfully starts at ' + str(r_time) + '\n')
29 29
                     f.close()
30
-                    os.system('run --rm --name extract_1 --gpus '"device=0"' -v /dev:/dev -v /home/mc365/sources:/sources -v /hdd:/hdd ellishuntingmoon/mailsys:0.4 python3 /sources/extract_01.py ' + id + '/ >> /dev/null')
31
-                    os.system('run --rm --name extract_2 --gpus '"device=1"' -v /dev:/dev -v /home/mc365/sources:/sources -v /hdd:/hdd ellishuntingmoon/mailsys:0.4 python3 /sources/extract_02.py ' + id + '/ >> /dev/null')
32
-                    f = open(file, 'ar')
30
+                    os.system('docker run --rm --name extract_1 --gpus '"device=0"' -v /dev:/dev -v /home/mc365/sources:/sources -v /hdd:/hdd ellishuntingmoon/mailsys:0.4 python3 /sources/extract_01.py ' + id + '/ >> /dev/null')
31
+                    os.system('docker run --rm --name extract_2 --gpus '"device=1"' -v /dev:/dev -v /home/mc365/sources:/sources -v /hdd:/hdd ellishuntingmoon/mailsys:0.4 python3 /sources/extract_02.py ' + id + '/ >> /dev/null')
32
+                    f = open(file, 'at')
33 33
                     r_time = time.ctime(time.time())
34 34
                     f.write('exectue is successfully ends at ' + str(r_time) + '\n')
35 35
                     f.close()

+ 5
- 5
auto_kpi.py Zobrazit soubor

@@ -31,19 +31,19 @@ def main():
31 31
                 logs = f.readlines()
32 32
                 f.close()
33 33
                 if len(logs) == 6:
34
-                    f = open(file, 'ar')
34
+                    f = open(file, 'at')
35 35
                     r_time = time.ctime(time.time())
36 36
                     f.write('kpi successfully starts at ' + str(r_time) + '\n')
37 37
                     f.close()
38 38
                     #FIXME: change coordinate_g.py when IMU sensor works and get generic optimizer for DBSCAN
39
-                    os.system('run --rm --name kpi --gpus '"device=1"' -v /dev:/dev -v /home/mc365/sources:/sources -v /hdd:/hdd ellishuntingmoon/mailsys:0.4 python3 /sources/kpi.py ' + id + '/ >> /dev/null')
40
-                    f = open(file, 'ar')
39
+                    os.system('docker run --rm --name kpi --gpus '"device=1"' -v /dev:/dev -v /home/mc365/sources:/sources -v /hdd:/hdd ellishuntingmoon/mailsys:0.4 python3 /sources/kpi.py ' + id + '/ >> /dev/null')
40
+                    f = open(file, 'at')
41 41
                     r_time = time.ctime(time.time())
42 42
                     f.write('kpi successfully ends at ' + str(r_time) + '\n')
43 43
                     f.close()
44 44
 
45
-                    transport = paramiko.Transport(('365mc.iptime.org', '63122'))
46
-                    transport.connect(username='mc365', password='tkadbrdhmc1!')
45
+                    transport = paramiko.Transport(('365mc.iptime.org', 63122))
46
+                    transport.connect(username='mc365', password='tkadbrdhMC1!')
47 47
                     sftp = paramiko.SFTPClient.from_transport(transport)
48 48
                     #FIXME: send file recursively
49 49
                     for file in file_list:

Načítá se…
Zrušit
Uložit