refactor: remove Conda support from Llama Stack

This commit is contained in:
r3v5 2025-07-17 13:55:56 +01:00
parent 140ee7d337
commit 4a483977f9
No known key found for this signature in database
GPG key ID: 7758B9F272DE67D9
44 changed files with 159 additions and 311 deletions

View file

@ -69,9 +69,6 @@ def run_stack_build_command(args: argparse.Namespace) -> None:
if args.image_type == ImageType.VENV.value:
current_venv = os.environ.get("VIRTUAL_ENV")
image_name = args.image_name or current_venv
elif args.image_type == ImageType.CONDA.value:
current_conda_env = os.environ.get("CONDA_DEFAULT_ENV")
image_name = args.image_name or current_conda_env
else:
image_name = args.image_name
@ -132,7 +129,7 @@ def run_stack_build_command(args: argparse.Namespace) -> None:
)
if not args.image_type:
cprint(
f"Please specify a image-type (container | conda | venv) for {args.template}",
f"Please specify a image-type (container | venv) for {args.template}",
color="red",
file=sys.stderr,
)
@ -158,22 +155,7 @@ def run_stack_build_command(args: argparse.Namespace) -> None:
),
)
if image_type == ImageType.CONDA.value:
if not image_name:
cprint(
f"No current conda environment detected or specified, will create a new conda environment with the name `llamastack-{name}`",
color="yellow",
file=sys.stderr,
)
image_name = f"llamastack-{name}"
else:
cprint(
f"Using conda environment {image_name}",
color="green",
file=sys.stderr,
)
else:
image_name = f"llamastack-{name}"
image_name = f"llamastack-{name}"
cprint(
textwrap.dedent(
@ -372,10 +354,7 @@ def _run_stack_build_command_from_build_config(
else:
if not image_name:
raise ValueError("Please specify an image name when building a container image without a template")
elif build_config.image_type == LlamaStackImageType.CONDA.value:
if not image_name:
raise ValueError("Please specify an image name when building a conda image")
elif build_config.image_type == LlamaStackImageType.VENV.value:
else:
if not image_name and os.environ.get("UV_SYSTEM_PYTHON"):
image_name = "__system__"
if not image_name:
@ -431,7 +410,6 @@ def _run_stack_build_command_from_build_config(
return_code = build_image(
build_config,
build_file_path,
image_name,
template_or_config=template_name or config_path or str(build_file_path),
run_config=run_config_file.as_posix() if run_config_file else None,