mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
added auto port find
This commit is contained in:
+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