mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 13:32:35 +00:00
more progress on auto-generation
This commit is contained in:
parent
cfa913fdd5
commit
e4509cb568
10 changed files with 309 additions and 73 deletions
|
|
@ -4,11 +4,34 @@
|
|||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from llama_stack.distribution.datatypes import RemoteProviderConfig
|
||||
from llama_stack.providers.utils.docker.service_config import DockerComposeServiceConfig
|
||||
|
||||
|
||||
DEFAULT_OLLAMA_PORT = 11434
|
||||
|
||||
|
||||
class OllamaImplConfig(RemoteProviderConfig):
|
||||
port: int = 11434
|
||||
port: int = DEFAULT_OLLAMA_PORT
|
||||
|
||||
@classmethod
|
||||
def sample_docker_compose_config(cls) -> Optional[DockerComposeServiceConfig]:
|
||||
return DockerComposeServiceConfig(
|
||||
image="ollama/ollama:latest",
|
||||
volumes=["$HOME/.ollama:/root/.ollama"],
|
||||
devices=["nvidia.com/gpu=all"],
|
||||
deploy={
|
||||
"resources": {
|
||||
"reservations": {
|
||||
"devices": [{"driver": "nvidia", "capabilities": ["gpu"]}]
|
||||
}
|
||||
}
|
||||
},
|
||||
runtime="nvidia",
|
||||
ports=[f"{DEFAULT_OLLAMA_PORT}:{DEFAULT_OLLAMA_PORT}"],
|
||||
)
|
||||
|
||||
|
||||
async def get_adapter_impl(config: RemoteProviderConfig, _deps):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue