mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-30 07:39:38 +00:00
fix configure
This commit is contained in:
parent
3dca86684c
commit
24e21a12e5
1 changed files with 10 additions and 9 deletions
|
@ -47,14 +47,15 @@ class StackConfigure(Subcommand):
|
||||||
def _run_stack_configure_cmd(self, args: argparse.Namespace) -> None:
|
def _run_stack_configure_cmd(self, args: argparse.Namespace) -> None:
|
||||||
from llama_toolchain.core.package import ImageType
|
from llama_toolchain.core.package import ImageType
|
||||||
|
|
||||||
with open(args.config, "r") as f:
|
build_config_file = Path(args.config)
|
||||||
try:
|
if not build_config_file.exists():
|
||||||
build_config = BuildConfig(**yaml.safe_load(f))
|
self.parser.error(
|
||||||
except Exception as e:
|
f"Could not find {build_config_file}. Please run `llama stack build` first"
|
||||||
self.parser.error(
|
)
|
||||||
f"Could not find {config_file}. Please run `llama stack build` first"
|
return
|
||||||
)
|
|
||||||
return
|
with open(build_config_file, "r") as f:
|
||||||
|
build_config = BuildConfig(**yaml.safe_load(f))
|
||||||
|
|
||||||
self._configure_llama_distribution(build_config)
|
self._configure_llama_distribution(build_config)
|
||||||
|
|
||||||
|
@ -76,7 +77,7 @@ class StackConfigure(Subcommand):
|
||||||
|
|
||||||
if package_file.exists():
|
if package_file.exists():
|
||||||
cprint(
|
cprint(
|
||||||
f"Configuration already exists for {build_config.distribution}. Will overwrite...",
|
f"Configuration already exists for {build_config.name}. Will overwrite...",
|
||||||
"yellow",
|
"yellow",
|
||||||
attrs=["bold"],
|
attrs=["bold"],
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue