mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-04 13:00:36 +08:00
added auto port find
This commit is contained in:
1 parent
0c239da17c
commit
e52190e22b
1 file changed
+3
-2
+3
-2
@@ -127,10 +127,11 @@ def main():
|
||||
|
||||
clear_save_dir()
|
||||
|
||||
import subprocess
|
||||
import re
|
||||
|
||||
def get_pids(port):
|
||||
import subprocess
|
||||
import re
|
||||
|
||||
command = "sudo lsof -i :%s | awk '{print $2}'" % port
|
||||
pids = subprocess.check_output(command, shell=True)
|
||||
pids = pids.strip()
|
||||
|
||||
Reference in new issue
Block a user