瀏覽代碼

check mutex

master
Jeong Geol Kim 4 年之前
父節點
當前提交
fddd9d2cd2
共有 3 個檔案被更改,包括 5 行新增3 行删除
  1. 2
    2
      auto_extract.py
  2. 1
    0
      extract_01.py
  3. 2
    1
      extract_02.py

+ 2
- 2
auto_extract.py 查看文件

@@ -35,11 +35,11 @@ def main():
35 35
                     r_time = time.ctime(time.time())
36 36
                     f.write('exectue is successfully starts at ' + str(r_time) + '\n')
37 37
                     f.close()
38
-                    cmd_list = ['docker run --rm --name extract_2 --gpus '"device=1"' -v /dev:/dev -v /home/mc365/sources:/sources -v /hdd:/hdd ellishuntingmoon/mailsys:0.5 python3 /sources/extract_02.py ' + id + '/ >> /dev/null', 'echo ext_1 start']
38
+                    cmd_list = ['docker run --rm --name extract_2 --gpus '"device=1"' -v /dev:/dev -v /home/mc365/sources:/sources -v /hdd:/hdd ellishuntingmoon/mailsys:0.5 python3 /sources/extract_02.py ' + id + '/', 'echo ext_1 start']
39 39
                     for index in range(0, len(cmd_list)):
40 40
                         thread_list.append(threading.Thread(target=cmd_run,args=(index,cmd_list)))
41 41
                         thread_list[index].start()         
42
-                    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.5 python3 /sources/extract_01.py ' + id + '/ >> /dev/null')       
42
+                    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.5 python3 /sources/extract_01.py ' + id + '/')       
43 43
                     f = open(file, 'at')
44 44
                     r_time = time.ctime(time.time())
45 45
                     f.write('exectue is successfully ends at ' + str(r_time) + '\n')

+ 1
- 0
extract_01.py 查看文件

@@ -8,6 +8,7 @@ target_dir = str(sys.argv[1])
8 8
 
9 9
 
10 10
 svo_list = os.listdir(target_dir)
11
+svo_list = [file for file in svo_list if file.endswith('1.svo')]
11 12
 svo_list = sorted(svo_list)
12 13
 del svo_list[-1]
13 14
 

+ 2
- 1
extract_02.py 查看文件

@@ -3,11 +3,12 @@ import os
3 3
 import glob
4 4
 import pandas as pd
5 5
 
6
-#ssd_dir = /data/36536536520201231/
6
+#target_dir = /hdd/36536536520201231/
7 7
 target_dir = sys.argv[1]
8 8
 
9 9
 
10 10
 svo_list = os.listdir(target_dir)
11
+svo_list = [file for file in svo_list if file.endswith('2.svo')]
11 12
 svo_list = sorted(svo_list)
12 13
 del svo_list[-1]
13 14
 

Loading…
取消
儲存