Expose LLAMASTACK_PORT in cli.stack.run

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
This commit is contained in:
Yuan Tang 2025-01-03 22:44:20 -05:00
parent 485476c29a
commit f2d190a6ba
No known key found for this signature in database

View file

@ -5,6 +5,7 @@
# the root directory of this source tree.
import argparse
import os
from pathlib import Path
from llama_stack.cli.subcommand import Subcommand
@ -34,7 +35,7 @@ class StackRun(Subcommand):
"--port",
type=int,
help="Port to run the server on. Defaults to 5000",
default=5000,
default=int(os.getenv("LLAMASTACK_PORT", 5000)),
)
self.parser.add_argument(
"--disable-ipv6",