Fix validator of "container" image type (#901)

This was missed in https://github.com/meta-llama/llama-stack/pull/802
somehow.
This commit is contained in:
Yuan Tang 2025-01-29 12:36:52 -05:00 committed by GitHub
parent 11b1cdf31d
commit 53721e91ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -74,7 +74,7 @@ def run_stack_build_command(
build_config.image_type = args.image_type
else:
cprint(
f"Please specify a image-type (docker | conda | venv) for {args.template}",
f"Please specify a image-type (container | conda | venv) for {args.template}",
color="red",
)
return
@ -95,10 +95,10 @@ def run_stack_build_command(
)
image_type = prompt(
"> Enter the image type you want your Llama Stack to be built as (docker or conda or venv): ",
"> Enter the image type you want your Llama Stack to be built as (container or conda or venv): ",
validator=Validator.from_callable(
lambda x: x in ["docker", "conda", "venv"],
error_message="Invalid image type, please enter conda or docker or venv",
lambda x: x in ["container", "conda", "venv"],
error_message="Invalid image type, please enter conda or container or venv",
),
default="conda",
)
@ -259,7 +259,7 @@ def _run_stack_build_command_from_build_config(
else:
if not image_name:
raise ValueError(
"Please specify an image name when building a docker image without a template"
"Please specify an image name when building a container image without a template"
)
elif build_config.image_type == ImageType.conda.value:
if not image_name: