mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-10 12:21:57 +08:00
added auto port find
This commit is contained in:
@@ -134,6 +134,7 @@ def get_pids(port):
|
||||
command = "sudo lsof -i :%s | awk '{print $2}'" % port
|
||||
pids = subprocess.check_output(command, shell=True)
|
||||
pids = pids.strip()
|
||||
print(pids)
|
||||
if pids:
|
||||
pids = re.sub(' +', ' ', pids)
|
||||
for pid in pids.split('\n'):
|
||||
|
||||
Reference in New Issue
Block a user