mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-05 04:17:32 +00:00
Remove additional_pip_packages; move deps to providers
This commit is contained in:
parent
6de36b6a15
commit
8d7ecf0c47
5 changed files with 18 additions and 32 deletions
|
@ -10,14 +10,6 @@ from typing import List, Optional
|
|||
from .datatypes import Api, DistributionSpec, RemoteProviderSpec
|
||||
from .distribution import api_providers
|
||||
|
||||
# These are the dependencies needed by the distribution server.
|
||||
# `llama-toolchain` is automatically installed by the installation script.
|
||||
COMMON_DEPENDENCIES = [
|
||||
"fastapi",
|
||||
"python-dotenv",
|
||||
"uvicorn",
|
||||
]
|
||||
|
||||
|
||||
def client_module(api: Api) -> str:
|
||||
return f"llama_toolchain.{api.value}.client"
|
||||
|
@ -38,22 +30,6 @@ def available_distribution_specs() -> List[DistributionSpec]:
|
|||
DistributionSpec(
|
||||
spec_id="inline",
|
||||
description="Use code from `llama_toolchain` itself to serve all llama stack APIs",
|
||||
additional_pip_packages=(
|
||||
COMMON_DEPENDENCIES
|
||||
# why do we need any of these? they should be completely covered
|
||||
# by the provider dependencies themselves
|
||||
+ [
|
||||
"accelerate",
|
||||
"blobfile",
|
||||
"codeshield",
|
||||
"fairscale",
|
||||
"pandas",
|
||||
"Pillow",
|
||||
"torch",
|
||||
"transformers",
|
||||
"fbgemm-gpu==0.8.0",
|
||||
]
|
||||
),
|
||||
provider_specs={
|
||||
Api.inference: providers[Api.inference]["meta-reference"],
|
||||
Api.safety: providers[Api.safety]["meta-reference"],
|
||||
|
@ -63,13 +39,11 @@ def available_distribution_specs() -> List[DistributionSpec]:
|
|||
DistributionSpec(
|
||||
spec_id="remote",
|
||||
description="Point to remote services for all llama stack APIs",
|
||||
additional_pip_packages=COMMON_DEPENDENCIES,
|
||||
provider_specs={x: remote_spec(x) for x in providers},
|
||||
),
|
||||
DistributionSpec(
|
||||
spec_id="ollama-inline",
|
||||
description="Like local-source, but use ollama for running LLM inference",
|
||||
additional_pip_packages=COMMON_DEPENDENCIES,
|
||||
provider_specs={
|
||||
Api.inference: providers[Api.inference]["meta-ollama"],
|
||||
Api.safety: providers[Api.safety]["meta-reference"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue