Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norm
vllm
Commits
4b61c6b6
Unverified
Commit
4b61c6b6
authored
Jan 10, 2024
by
Yunfeng Bai
Committed by
GitHub
Jan 10, 2024
Browse files
`get_ip()`: Fix ipv4 ipv6 dualstack (#2408)
parent
79d64c49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
vllm/utils.py
vllm/utils.py
+3
-1
No files found.
vllm/utils.py
View file @
4b61c6b6
...
@@ -58,7 +58,9 @@ def in_wsl() -> bool:
...
@@ -58,7 +58,9 @@ def in_wsl() -> bool:
def
get_ip
()
->
str
:
def
get_ip
()
->
str
:
return
socket
.
gethostbyname
(
socket
.
gethostname
())
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
)
s
.
connect
((
"8.8.8.8"
,
80
))
# Doesn't need to be reachable
return
s
.
getsockname
()[
0
]
def
get_open_port
()
->
int
:
def
get_open_port
()
->
int
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment