mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 15:49:49 +00:00
Adding docker-compose.yaml, starting to simplify
This commit is contained in:
parent
e4509cb568
commit
f38e76ee98
14 changed files with 516 additions and 386 deletions
|
|
@ -1,5 +0,0 @@
|
|||
# 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.
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
# 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 Any, Dict, List, Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class LiteralString(str):
|
||||
pass # Marker class for strings we want to format with >
|
||||
|
||||
|
||||
class DockerComposeServiceConfig(BaseModel):
|
||||
"""Configuration for a single service in docker-compose."""
|
||||
|
||||
image: str
|
||||
volumes: Optional[List[str]] = None
|
||||
network_mode: str = "bridge"
|
||||
ports: Optional[List[str]] = None
|
||||
devices: Optional[List[str]] = None
|
||||
environment: Optional[Dict[str, str]] = None
|
||||
command: Optional[str] = None
|
||||
depends_on: Optional[List[str]] = None
|
||||
deploy: Optional[Dict[str, Any]] = None
|
||||
runtime: Optional[str] = None
|
||||
entrypoint: Optional[str] = None
|
||||
|
|
@ -54,11 +54,11 @@ class SqliteKVStoreConfig(CommonConfig):
|
|||
)
|
||||
|
||||
@classmethod
|
||||
def sample_run_config(cls, db_name: str = "kvstore.db"):
|
||||
def sample_run_config(cls, dir: str = "runtime", db_name: str = "kvstore.db"):
|
||||
return {
|
||||
"type": "sqlite",
|
||||
"namespace": None,
|
||||
"db_path": "${env.SQLITE_STORE_DIR:~/.llama/runtime/" + db_name + "}",
|
||||
"db_path": "${env.SQLITE_STORE_DIR:~/.llama/" + f"{dir}/{db_name}" + "}",
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue