[Misc]: allow user to specify port in distributed setting (#4914)

This commit is contained in:
Wenwei Zhang
2024-05-20 17:45:06 +00:00
committed by GitHub
parent da5a0b539d
commit 546a97ef69
2 changed files with 10 additions and 0 deletions
+3
View File
@@ -282,6 +282,9 @@ def get_distributed_init_method(ip: str, port: int) -> str:
def get_open_port() -> int:
port = envs.VLLM_PORT
if port is not None:
return port
# try ipv4
try:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: