diff --git a/docker/chromadb/compose.yaml b/docker/chromadb/compose.yaml new file mode 100644 index 000000000..7d48c93d6 --- /dev/null +++ b/docker/chromadb/compose.yaml @@ -0,0 +1,11 @@ +services: + chromadb: + image: chromadb/chroma:latest + container_name: chromadb + ports: + - "6000:6000" + volumes: + - ./chroma_vdb:/chroma/chroma + environment: + - IS_PERSISTENT=TRUE + network_mode: "host" diff --git a/docker/llamastack/compose.yaml b/docker/llamastack/compose.yaml new file mode 100644 index 000000000..8ff805f15 --- /dev/null +++ b/docker/llamastack/compose.yaml @@ -0,0 +1,20 @@ +services: + llamastack: + depends_on: + - ollama + image: llamastack/distribution-ollama + network_mode: "host" + volumes: + - ~/.llama:/root/.llama + # Link to ollama run.yaml file + - ./run.yaml:/root/my-run.yaml + ports: + - "5000:5000" + # Hack: wait for ollama 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: + condition: on-failure + delay: 3s + max_attempts: 5 + window: 60s diff --git a/docker/ollama/compose.yaml b/docker/ollama/compose.yaml new file mode 100644 index 000000000..42b3838ee --- /dev/null +++ b/docker/ollama/compose.yaml @@ -0,0 +1,11 @@ +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: + - "11434:11434" + command: [] +volumes: + ollama: diff --git a/docker/pgvector/compose.yaml b/docker/pgvector/compose.yaml new file mode 100644 index 000000000..df1155451 --- /dev/null +++ b/docker/pgvector/compose.yaml @@ -0,0 +1,18 @@ +services: + postgres: + build: + context: ./postgres + dockerfile: postgres.Dockerfile + ports: + - "5432:5432" + volumes: + - postgres_data:/var/lib/postgresql/data + - ./postgres/vector_extension.sql:/docker-entrypoint-initdb.d/0-vector_extension.sql + # - ./postgres/0-vector-extension.sh:/docker-entrypoint-initdb.d/0-vector-extension.sh + + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres + - POSTGRES_DB=vectorexample +volumes: + postgres_data: diff --git a/docker/pgvector/postgres/0-vector-extension.sh b/docker/pgvector/postgres/0-vector-extension.sh new file mode 100755 index 000000000..3d1ecac6a --- /dev/null +++ b/docker/pgvector/postgres/0-vector-extension.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# 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. + +set -e + +echo "In create extension" + +psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname="$POSTGRES_DB" <