From 81ed0327f31d6b1f7e4c875793b3654b547d5aae Mon Sep 17 00:00:00 2001 From: Xi Yan Date: Fri, 25 Oct 2024 10:43:22 -0700 Subject: [PATCH] tmp wip --- llama_stack/cli/stack/build.py | 4 ++-- llama_stack/templates/bedrock/build.yaml | 1 + llama_stack/templates/fireworks/build.yaml | 1 + llama_stack/templates/hf-endpoint/build.yaml | 1 + llama_stack/templates/hf-serverless/build.yaml | 1 + llama_stack/templates/meta-reference-gpu/build.yaml | 1 + llama_stack/templates/ollama/build.yaml | 1 + llama_stack/templates/tgi/build.yaml | 1 + llama_stack/templates/together/build.yaml | 1 + llama_stack/templates/vllm/build.yaml | 1 + setup.py | 6 +----- 11 files changed, 12 insertions(+), 7 deletions(-) create mode 120000 llama_stack/templates/bedrock/build.yaml create mode 120000 llama_stack/templates/fireworks/build.yaml create mode 120000 llama_stack/templates/hf-endpoint/build.yaml create mode 120000 llama_stack/templates/hf-serverless/build.yaml create mode 120000 llama_stack/templates/meta-reference-gpu/build.yaml create mode 120000 llama_stack/templates/ollama/build.yaml create mode 120000 llama_stack/templates/tgi/build.yaml create mode 120000 llama_stack/templates/together/build.yaml create mode 120000 llama_stack/templates/vllm/build.yaml diff --git a/llama_stack/cli/stack/build.py b/llama_stack/cli/stack/build.py index 8e24c8bfa..fde471986 100644 --- a/llama_stack/cli/stack/build.py +++ b/llama_stack/cli/stack/build.py @@ -13,14 +13,14 @@ from functools import lru_cache from pathlib import Path TEMPLATES_PATH = ( - Path(os.path.relpath(__file__)).parent.parent.parent.parent / "distributions" + 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 / "distributions" + TEMPLATES_PATH = Path(os.path.relpath(__file__)).parent.parent.parent / "templates" @lru_cache() diff --git a/llama_stack/templates/bedrock/build.yaml b/llama_stack/templates/bedrock/build.yaml new file mode 120000 index 000000000..28a253c78 --- /dev/null +++ b/llama_stack/templates/bedrock/build.yaml @@ -0,0 +1 @@ +../../distributions/bedrock/build.yaml \ No newline at end of file diff --git a/llama_stack/templates/fireworks/build.yaml b/llama_stack/templates/fireworks/build.yaml new file mode 120000 index 000000000..14e6cb2fe --- /dev/null +++ b/llama_stack/templates/fireworks/build.yaml @@ -0,0 +1 @@ +../../distributions/fireworks/build.yaml \ No newline at end of file diff --git a/llama_stack/templates/hf-endpoint/build.yaml b/llama_stack/templates/hf-endpoint/build.yaml new file mode 120000 index 000000000..469d4da77 --- /dev/null +++ b/llama_stack/templates/hf-endpoint/build.yaml @@ -0,0 +1 @@ +../../distributions/hf-endpoint/build.yaml \ No newline at end of file diff --git a/llama_stack/templates/hf-serverless/build.yaml b/llama_stack/templates/hf-serverless/build.yaml new file mode 120000 index 000000000..6f14f7bc4 --- /dev/null +++ b/llama_stack/templates/hf-serverless/build.yaml @@ -0,0 +1 @@ +../../distributions/hf-serverless/build.yaml \ No newline at end of file diff --git a/llama_stack/templates/meta-reference-gpu/build.yaml b/llama_stack/templates/meta-reference-gpu/build.yaml new file mode 120000 index 000000000..7a7c35fb5 --- /dev/null +++ b/llama_stack/templates/meta-reference-gpu/build.yaml @@ -0,0 +1 @@ +../../distributions/meta-reference-gpu/build.yaml \ No newline at end of file diff --git a/llama_stack/templates/ollama/build.yaml b/llama_stack/templates/ollama/build.yaml new file mode 120000 index 000000000..d8bf8a15d --- /dev/null +++ b/llama_stack/templates/ollama/build.yaml @@ -0,0 +1 @@ +../../distributions/ollama/build.yaml \ No newline at end of file diff --git a/llama_stack/templates/tgi/build.yaml b/llama_stack/templates/tgi/build.yaml new file mode 120000 index 000000000..b3144911c --- /dev/null +++ b/llama_stack/templates/tgi/build.yaml @@ -0,0 +1 @@ +../../distributions/tgi/build.yaml \ No newline at end of file diff --git a/llama_stack/templates/together/build.yaml b/llama_stack/templates/together/build.yaml new file mode 120000 index 000000000..69bc4510a --- /dev/null +++ b/llama_stack/templates/together/build.yaml @@ -0,0 +1 @@ +../../distributions/together/build.yaml \ No newline at end of file diff --git a/llama_stack/templates/vllm/build.yaml b/llama_stack/templates/vllm/build.yaml new file mode 120000 index 000000000..8152145d3 --- /dev/null +++ b/llama_stack/templates/vllm/build.yaml @@ -0,0 +1 @@ +../../distributions/vllm/build.yaml \ No newline at end of file diff --git a/setup.py b/setup.py index 9a678892d..78ceb145e 100644 --- a/setup.py +++ b/setup.py @@ -29,11 +29,7 @@ setup( long_description=open("README.md").read(), long_description_content_type="text/markdown", url="https://github.com/meta-llama/llama-stack", - # workaround to include distributions/*/build.yaml files in the package - # https://stackoverflow.com/questions/62550952/including-package-data-python-from-top-level-when-package-is-in-subdirectory - packages=find_packages() + ["llama_stack.cli.distributions"], - package_dir={"llama_stack.cli.distributions": "distributions"}, - package_data={"llama_stack.cli.distributions": ["distributions/*/build.yaml"]}, + packages=find_packages(), classifiers=[ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3",