This commit is contained in:
Raghotham Murthy 2025-05-28 17:31:32 -07:00
parent fb47cc0931
commit 414642b092
8 changed files with 46 additions and 29 deletions

View file

@ -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}")