mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 15:23:51 +00:00
fix configure script to work with config file
This commit is contained in:
parent
9d5582245d
commit
f05347be8f
1 changed files with 7 additions and 6 deletions
|
@ -63,17 +63,18 @@ class StackConfigure(Subcommand):
|
||||||
from llama_toolchain.core.package import BuildType
|
from llama_toolchain.core.package import BuildType
|
||||||
|
|
||||||
if args.config_file:
|
if args.config_file:
|
||||||
build_config = BuildConfig(**yaml.safe_load(f))
|
with open(args.config_file, "r") as f:
|
||||||
build_type = BuildType(build_config.package_type)
|
build_config = BuildConfig(**yaml.safe_load(f))
|
||||||
|
build_type = BuildType(build_config.package_type)
|
||||||
|
distribution = build_config.distribution
|
||||||
|
name = build_config.name
|
||||||
else:
|
else:
|
||||||
build_type = BuildType(args.package_type)
|
build_type = BuildType(args.package_type)
|
||||||
name = args.name
|
name = args.name
|
||||||
|
distribution = args.distribution
|
||||||
|
|
||||||
config_file = (
|
config_file = (
|
||||||
BUILDS_BASE_DIR
|
BUILDS_BASE_DIR / distribution / build_type.descriptor() / f"{name}.yaml"
|
||||||
/ args.distribution
|
|
||||||
/ build_type.descriptor()
|
|
||||||
/ f"{name}.yaml"
|
|
||||||
)
|
)
|
||||||
if not config_file.exists():
|
if not config_file.exists():
|
||||||
self.parser.error(
|
self.parser.error(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue