Add distribution CLI scaffolding

This commit is contained in:
Ashwin Bharambe 2024-08-01 14:44:57 -07:00
parent 09cf3fe78b
commit 5a583cf16e
13 changed files with 277 additions and 3 deletions

View file

@ -0,0 +1,5 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.

View file

@ -0,0 +1,19 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from typing import List
from pydantic import BaseModel
class LlamaStackDistribution(BaseModel):
name: str
description: str
# you must install the packages to get the functionality needed.
# later, we may have a docker image be the main artifact of
# a distribution.
pip_packages: List[str]

View file

@ -0,0 +1,5 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.

View file

@ -0,0 +1,5 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.

View file

@ -0,0 +1,24 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from typing import List
from .datatypes import LlamaStackDistribution
def all_registered_distributions() -> List[LlamaStackDistribution]:
return [
LlamaStackDistribution(
name="local-source",
description="Use code within `llama_toolchain` itself to run model inference and everything on top",
pip_packages=[],
),
LlamaStackDistribution(
name="local-ollama",
description="Like local-source, but use ollama for running LLM inference",
pip_packages=[],
),
]