move build.yaml to templates, symlink in distributions

This commit is contained in:
Xi Yan 2024-10-25 11:54:09 -07:00
parent 81ed0327f3
commit 56f9b7d5d6
23 changed files with 136 additions and 142 deletions

View file

@ -12,15 +12,7 @@ import os
from functools import lru_cache
from pathlib import Path
TEMPLATES_PATH = (
Path(os.path.relpath(__file__)).parent.parent.parent.parent / "distributions----"
)
# build.yaml templates exist in the llama-stack/distributions while wheel installs llama-stack/llama_stack
# we copied the distributions folder to llama-stack/llama_stack/cli/distributions for wheel builds,
# so we need to check both locations
if not TEMPLATES_PATH.exists():
TEMPLATES_PATH = Path(os.path.relpath(__file__)).parent.parent.parent / "templates"
TEMPLATES_PATH = Path(os.path.relpath(__file__)).parent.parent.parent / "templates"
@lru_cache()