mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-05 20:27:35 +00:00
llama stack start -> llama stack run
This commit is contained in:
parent
fab6bd1728
commit
fb3c4566ce
5 changed files with 13 additions and 13 deletions
|
@ -16,17 +16,17 @@ from llama_toolchain.core.datatypes import * # noqa: F403
|
|||
from llama_toolchain.common.config_dirs import BUILDS_BASE_DIR
|
||||
|
||||
|
||||
class StackStart(Subcommand):
|
||||
class StackRun(Subcommand):
|
||||
def __init__(self, subparsers: argparse._SubParsersAction):
|
||||
super().__init__()
|
||||
self.parser = subparsers.add_parser(
|
||||
"start",
|
||||
prog="llama stack start",
|
||||
"run",
|
||||
prog="llama stack run",
|
||||
description="""start the server for a Llama Stack Distribution. You should have already built (or downloaded) and configured the distribution.""",
|
||||
formatter_class=argparse.RawTextHelpFormatter,
|
||||
)
|
||||
self._add_arguments()
|
||||
self.parser.set_defaults(func=self._run_stack_start_cmd)
|
||||
self.parser.set_defaults(func=self._run_stack_run_cmd)
|
||||
|
||||
def _add_arguments(self):
|
||||
from llama_toolchain.core.package import BuildType
|
||||
|
@ -39,7 +39,7 @@ class StackStart(Subcommand):
|
|||
self.parser.add_argument(
|
||||
"--name",
|
||||
type=str,
|
||||
help="Name of the API build you want to start",
|
||||
help="Name of the build you want to start",
|
||||
required=True,
|
||||
)
|
||||
self.parser.add_argument(
|
||||
|
@ -61,7 +61,7 @@ class StackStart(Subcommand):
|
|||
default=False,
|
||||
)
|
||||
|
||||
def _run_stack_start_cmd(self, args: argparse.Namespace) -> None:
|
||||
def _run_stack_run_cmd(self, args: argparse.Namespace) -> None:
|
||||
from llama_toolchain.common.exec import run_with_pty
|
||||
from llama_toolchain.core.package import BuildType
|
||||
|
|
@ -11,7 +11,7 @@ from llama_toolchain.cli.subcommand import Subcommand
|
|||
from .build import StackBuild
|
||||
from .configure import StackConfigure
|
||||
from .list import StackList
|
||||
from .start import StackStart
|
||||
from .run import StackRun
|
||||
|
||||
|
||||
class StackParser(Subcommand):
|
||||
|
@ -29,4 +29,4 @@ class StackParser(Subcommand):
|
|||
StackBuild.create(subparsers)
|
||||
StackConfigure.create(subparsers)
|
||||
StackList.create(subparsers)
|
||||
StackStart.create(subparsers)
|
||||
StackRun.create(subparsers)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue