mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-11 12:31:23 +08:00
added auto port find
This commit is contained in:
@@ -132,6 +132,7 @@ def get_pids(port):
|
||||
import subprocess
|
||||
import re
|
||||
|
||||
print('getting pid')
|
||||
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