mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-01 03:58:40 +00:00
fix
This commit is contained in:
parent
fb47cc0931
commit
414642b092
8 changed files with 46 additions and 29 deletions
|
@ -241,6 +241,7 @@ def run_stack_build_command(args: argparse.Namespace) -> None:
|
|||
image_name=image_name,
|
||||
config_path=args.config,
|
||||
template_name=args.template,
|
||||
exit_after_containerfile=args.exit_after_containerfile,
|
||||
)
|
||||
|
||||
except (Exception, RuntimeError) as exc:
|
||||
|
@ -354,6 +355,7 @@ def _run_stack_build_command_from_build_config(
|
|||
image_name: str | None = None,
|
||||
template_name: str | None = None,
|
||||
config_path: str | None = None,
|
||||
exit_after_containerfile: bool = False,
|
||||
) -> Path | Traversable:
|
||||
image_name = image_name or build_config.image_name
|
||||
if build_config.image_type == LlamaStackImageType.CONTAINER.value:
|
||||
|
@ -396,6 +398,7 @@ def _run_stack_build_command_from_build_config(
|
|||
image_name,
|
||||
template_or_config=template_name or config_path or str(build_file_path),
|
||||
run_config=run_config_file,
|
||||
exit_after_containerfile=exit_after_containerfile,
|
||||
)
|
||||
if return_code != 0:
|
||||
raise RuntimeError(f"Failed to build image {image_name}")
|
||||
|
|
|
@ -82,6 +82,13 @@ the build. If not specified, currently active environment will be used if found.
|
|||
help="Build a config for a list of providers and only those providers. This list is formatted like: api1=provider1,api2=provider2. Where there can be multiple providers per API.",
|
||||
)
|
||||
|
||||
self.parser.add_argument(
|
||||
"--exit-after-containerfile",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="For container builds, exit after creating the Containerfile without building the image",
|
||||
)
|
||||
|
||||
def _run_stack_build_command(self, args: argparse.Namespace) -> None:
|
||||
# always keep implementation completely silo-ed away from CLI so CLI
|
||||
# can be fast to load and reduces dependencies
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue