fix: image_name defaults to none

since `--image-name` has a default of None, often a user can get `llamastack-None` when using environments like venv and container.

currently, the image_name is llamastack- with the value of the flag or the current conda environment. Change this to be either the value of the flag OR the current image_type. So now the default image names are things like:

`llamastack-venv`
`llamastack-conda`
`llamastack-container`

Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
Charlie Doern 2025-02-23 19:51:30 -05:00
parent 6227e1e3b9
commit 0c4591a73d

View file

@ -71,6 +71,10 @@ def run_stack_build_command(args: argparse.Namespace) -> None:
else:
image_name = args.image_name
if not image_name:
image_name = f"llamastack-{args.image_type}"
print(f"No image name provided and could not detect one from environment. Using image_name: {image_name}")
if args.template:
available_templates = available_templates_specs()
if args.template not in available_templates: