mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-03 12:50:15 +08:00
added auto port find
This commit is contained in:
1 parent
e52190e22b
commit
8651173920
1 file changed
+1
@@ -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