mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 02:53:30 +00:00
Handle both ipv6 and ipv4 interfaces together
This commit is contained in:
parent
0538cc297e
commit
94728d6983
1 changed files with 2 additions and 1 deletions
|
@ -337,7 +337,8 @@ def main(
|
||||||
import uvicorn
|
import uvicorn
|
||||||
|
|
||||||
# FYI this does not do hot-reloads
|
# FYI this does not do hot-reloads
|
||||||
listen_host = "::" if not disable_ipv6 else "0.0.0.0"
|
|
||||||
|
listen_host = ["::", "0.0.0.0"] if not disable_ipv6 else "0.0.0.0"
|
||||||
print(f"Listening on {listen_host}:{port}")
|
print(f"Listening on {listen_host}:{port}")
|
||||||
uvicorn.run(app, host=listen_host, port=port)
|
uvicorn.run(app, host=listen_host, port=port)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue