From f2d190a6ba4d406be01b9f471f0fb795b9543c78 Mon Sep 17 00:00:00 2001 From: Yuan Tang Date: Fri, 3 Jan 2025 22:44:20 -0500 Subject: [PATCH] Expose LLAMASTACK_PORT in cli.stack.run Signed-off-by: Yuan Tang --- llama_stack/cli/stack/run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llama_stack/cli/stack/run.py b/llama_stack/cli/stack/run.py index fb4e76d7a..7ff50bd77 100644 --- a/llama_stack/cli/stack/run.py +++ b/llama_stack/cli/stack/run.py @@ -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",