@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 4b61c6b669
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 17, 05:30 UTC

`get_ip()`: Fix ipv4 ipv6 dualstack (#2408)

Yunfeng Bai committed Jan 10, 2024 at 11:39 UTC 4b61c6b669e368c6850531815940d9a542b9f223
1 file changed +3 -1
vllm/utils.py
+3 -1
@@ -58,7 +58,9 @@ def in_wsl() -> bool:
58
59
60 def get_ip() -> str:
61 - return socket.gethostbyname(socket.gethostname())
61 + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
62 + s.connect(("8.8.8.8", 80)) # Doesn't need to be reachable
63 + return s.getsockname()[0]
64
65
66 def get_open_port() -> int: