From 4f367cbf6bea79746624125d7527a7e3c13f65ae Mon Sep 17 00:00:00 2001 From: Xi Yan Date: Fri, 8 Nov 2024 14:55:04 -0800 Subject: [PATCH] remove network host --- docker/chromadb/compose.yaml | 3 +- docker/llamastack/{ => ollama}/compose.yaml | 5 +-- docker/llamastack/together/compose.yaml | 15 +++++++ docker/llamastack/together/run.yaml | 47 +++++++++++++++++++++ docker/ollama/compose.yaml | 1 - 5 files changed, 65 insertions(+), 6 deletions(-) rename docker/llamastack/{ => ollama}/compose.yaml (77%) create mode 100644 docker/llamastack/together/compose.yaml create mode 100644 docker/llamastack/together/run.yaml diff --git a/docker/chromadb/compose.yaml b/docker/chromadb/compose.yaml index 7d48c93d6..77c356a2b 100644 --- a/docker/chromadb/compose.yaml +++ b/docker/chromadb/compose.yaml @@ -3,9 +3,8 @@ services: image: chromadb/chroma:latest container_name: chromadb ports: - - "6000:6000" + - "8000:8000" volumes: - ./chroma_vdb:/chroma/chroma environment: - IS_PERSISTENT=TRUE - network_mode: "host" diff --git a/docker/llamastack/compose.yaml b/docker/llamastack/ollama/compose.yaml similarity index 77% rename from docker/llamastack/compose.yaml rename to docker/llamastack/ollama/compose.yaml index 8ff805f15..36ed89938 100644 --- a/docker/llamastack/compose.yaml +++ b/docker/llamastack/ollama/compose.yaml @@ -3,14 +3,13 @@ services: depends_on: - ollama image: llamastack/distribution-ollama - network_mode: "host" volumes: - ~/.llama:/root/.llama - # Link to ollama run.yaml file + # Link to run.yaml file - ./run.yaml:/root/my-run.yaml ports: - "5000:5000" - # Hack: wait for ollama server to start before starting docker + # Hack: wait for server to start before starting docker entrypoint: bash -c "sleep 60; python -m llama_stack.distribution.server.server --yaml_config /root/my-run.yaml" deploy: restart_policy: diff --git a/docker/llamastack/together/compose.yaml b/docker/llamastack/together/compose.yaml new file mode 100644 index 000000000..aa742a848 --- /dev/null +++ b/docker/llamastack/together/compose.yaml @@ -0,0 +1,15 @@ +services: + llamastack: + image: llamastack/distribution-together + volumes: + - ~/.llama:/root/.llama + - ./run.yaml:/root/llamastack-run-together.yaml + ports: + - "5000:5000" + entrypoint: bash -c "python -m llama_stack.distribution.server.server --yaml_config /root/llamastack-run-together.yaml" + deploy: + restart_policy: + condition: on-failure + delay: 3s + max_attempts: 5 + window: 60s diff --git a/docker/llamastack/together/run.yaml b/docker/llamastack/together/run.yaml new file mode 100644 index 000000000..87fd4dcd7 --- /dev/null +++ b/docker/llamastack/together/run.yaml @@ -0,0 +1,47 @@ +version: '2' +built_at: '2024-10-08T17:40:45.325529' +image_name: local +docker_image: null +conda_env: local +apis: +- shields +- agents +- models +- memory +- memory_banks +- inference +- safety +providers: + inference: + - provider_id: together0 + provider_type: remote::together + config: + url: https://api.together.xyz/v1 + # api_key: + safety: + - provider_id: meta0 + provider_type: meta-reference + config: + llama_guard_shield: + model: Llama-Guard-3-1B + excluded_categories: [] + disable_input_check: false + disable_output_check: false + prompt_guard_shield: + model: Prompt-Guard-86M + memory: + - provider_id: meta0 + provider_type: remote::weaviate + config: {} + agents: + - provider_id: meta0 + provider_type: meta-reference + config: + persistence_store: + namespace: null + type: sqlite + db_path: ~/.llama/runtime/kvstore.db + telemetry: + - provider_id: meta0 + provider_type: meta-reference + config: {} diff --git a/docker/ollama/compose.yaml b/docker/ollama/compose.yaml index 42b3838ee..f80198635 100644 --- a/docker/ollama/compose.yaml +++ b/docker/ollama/compose.yaml @@ -1,7 +1,6 @@ services: ollama: image: ollama/ollama:latest - network_mode: "host" volumes: - ollama:/root/.ollama # this solution synchronizes with the docker volume and loads the model rocket fast ports: