mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 04:04:14 +00:00
Add distribution CLI scaffolding
This commit is contained in:
parent
09cf3fe78b
commit
5a583cf16e
13 changed files with 277 additions and 3 deletions
5
llama_toolchain/distribution/__init__.py
Normal file
5
llama_toolchain/distribution/__init__.py
Normal 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.
|
19
llama_toolchain/distribution/datatypes.py
Normal file
19
llama_toolchain/distribution/datatypes.py
Normal 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]
|
5
llama_toolchain/distribution/local-ollama/install.sh
Normal file
5
llama_toolchain/distribution/local-ollama/install.sh
Normal 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.
|
5
llama_toolchain/distribution/local/install.sh
Normal file
5
llama_toolchain/distribution/local/install.sh
Normal 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.
|
24
llama_toolchain/distribution/registry.py
Normal file
24
llama_toolchain/distribution/registry.py
Normal 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=[],
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue