From a2ae1d882014f9a96c59b5b78ecf85a35fa43a21 Mon Sep 17 00:00:00 2001 From: cybermaggedon Date: Thu, 22 Aug 2024 21:20:17 +0100 Subject: [PATCH] Generate all YAML files (#24) * All templates generated, added missing file * Up version --- .gitignore | 2 + Makefile | 16 +- docker-compose-storage.yaml | 115 ----- setup.py | 2 +- .../{docker-compose.jsonnet => main.jsonnet} | 0 tests/test-llm2 | 15 + tests/test-llm3 | 15 + ...ure.yaml => tg-launch-azure-cassandra.yaml | 49 +- tg-launch-azure-neo4j.yaml | 292 ++++++++++-- ...k.yaml => tg-launch-bedrock-cassandra.yaml | 49 +- tg-launch-bedrock-neo4j.yaml | 298 ++++++++++-- ...de.yaml => tg-launch-claude-cassandra.yaml | 49 +- tg-launch-claude-neo4j.yaml | 292 ++++++++++-- ...re.yaml => tg-launch-cohere-cassandra.yaml | 49 +- tg-launch-cohere-neo4j.yaml | 288 ++++++++++-- tg-launch-mix-neo4j.yaml | 271 ----------- tg-launch-mix.yaml | 440 ------------------ ...ma.yaml => tg-launch-ollama-cassandra.yaml | 49 +- tg-launch-ollama-neo4j.yaml | 280 +++++++++-- ...ai.yaml => tg-launch-openai-cassandra.yaml | 49 +- ....yaml => tg-launch-vertexai-cassandra.yaml | 49 +- tg-launch-vertexai-neo4j.yaml | 292 ++++++++++-- trustgraph/clients/base.py | 121 +++++ 23 files changed, 1819 insertions(+), 1263 deletions(-) delete mode 100644 docker-compose-storage.yaml rename templates/{docker-compose.jsonnet => main.jsonnet} (100%) create mode 100755 tests/test-llm2 create mode 100755 tests/test-llm3 rename tg-launch-azure.yaml => tg-launch-azure-cassandra.yaml (96%) rename tg-launch-bedrock.yaml => tg-launch-bedrock-cassandra.yaml (96%) rename tg-launch-claude.yaml => tg-launch-claude-cassandra.yaml (96%) rename tg-launch-cohere.yaml => tg-launch-cohere-cassandra.yaml (96%) delete mode 100644 tg-launch-mix-neo4j.yaml delete mode 100644 tg-launch-mix.yaml rename tg-launch-ollama.yaml => tg-launch-ollama-cassandra.yaml (96%) rename tg-launch-openai.yaml => tg-launch-openai-cassandra.yaml (96%) rename tg-launch-vertexai.yaml => tg-launch-vertexai-cassandra.yaml (96%) create mode 100644 trustgraph/clients/base.py diff --git a/.gitignore b/.gitignore index fdd19e0a..73dc07b4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ __pycache__/ env/ *.egg_info/ +*.parquet +templates/components/version.jsonnet diff --git a/Makefile b/Makefile index f78307ac..c831b18a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # VERSION=$(shell git describe | sed 's/^v//') -VERSION=0.7.2 +VERSION=0.7.3 DOCKER=podman @@ -30,7 +30,6 @@ clean: rm -rf wheels/ set-version: -# sed -i 's/trustgraph-flow:[0-9]*\.[0-9]*\.[0-9]*/trustgraph-flow:'${VERSION}'/' docker-compose*.yaml echo '"${VERSION}"' > templates/components/version.jsonnet TEMPLATES=azure bedrock claude cohere mix ollama openai vertexai \ @@ -38,8 +37,19 @@ TEMPLATES=azure bedrock claude cohere mix ollama openai vertexai \ DCS=$(foreach template,${TEMPLATES},${template:%=tg-launch-%.yaml}) -update-templates: set-version ${DCS} +MODELS=azure bedrock claude cohere ollama openai vertexai +GRAPHS=cassandra neo4j tg-launch-%.yaml: templates/%.jsonnet templates/components/version.jsonnet jsonnet -S ${@:tg-launch-%.yaml=templates/%.jsonnet} > $@ +update-templates: set-version + for model in ${MODELS}; do \ + for graph in ${GRAPHS}; do \ + cm=$${graph},cassandra,pulsar,milvus,grafana,trustgraph,$${model}; \ + input=templates/main.jsonnet; \ + output=tg-launch-$${model}-$${graph}.yaml; \ + echo $${model} + $${graph} '->' $${output}; \ + jsonnet --ext-str options=$${cm} -S $${input} > $${output}; \ + done; \ + done diff --git a/docker-compose-storage.yaml b/docker-compose-storage.yaml deleted file mode 100644 index fc366799..00000000 --- a/docker-compose-storage.yaml +++ /dev/null @@ -1,115 +0,0 @@ -"services": - "cassandra": - "image": "docker.io/cassandra:4.1.5" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" - "etcd": - "command": - - "etcd" - - "-advertise-client-urls=http://127.0.0.1:2379" - - "-listen-client-urls" - - "http://0.0.0.0:2379" - - "--data-dir" - - "/etcd" - "environment": - "ETCD_AUTO_COMPACTION_MODE": "revision" - "ETCD_AUTO_COMPACTION_RETENTION": "1000" - "ETCD_QUOTA_BACKEND_BYTES": "4294967296" - "ETCD_SNAPSHOT_COUNT": "50000" - "image": "quay.io/coreos/etcd:v3.5.5" - "ports": - - "2379:2379" - "restart": "on-failure:100" - "volumes": - - "etcd:/etcd" - "grafana": - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:10.0.0" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/dashboard.yml" - - "./grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml" - - "./grafana/dashboard.json:/var/lib/grafana/dashboards/dashboard.json" - "init-pulsar": - "command": - - "sh" - - "-c" - - "pulsar-admin --admin-url http://pulsar:8080 tenants create tg && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response && pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response" - "depends_on": - "pulsar": - "condition": "service_started" - "image": "docker.io/apachepulsar/pulsar:3.3.0" - "restart": "on-failure:100" - "milvus": - "command": - - "milvus" - - "run" - - "standalone" - "environment": - "ETCD_ENDPOINTS": "etcd:2379" - "MINIO_ADDRESS": "minio:9000" - "image": "docker.io/milvusdb/milvus:v2.4.5" - "ports": - - "9091:9091" - - "19530:19530" - "restart": "on-failure:100" - "volumes": - - "milvus:/var/lib/milvus" - "minio": - "command": - - "minio" - - "server" - - "/minio_data" - - "--console-address" - - ":9001" - "environment": - "MINIO_ROOT_PASSWORD": "minioadmin" - "MINIO_ROOT_USER": "minioadmin" - "image": "docker.io/minio/minio:RELEASE.2024-07-04T14-25-45Z" - "ports": - - "9001:9001" - "restart": "on-failure:100" - "volumes": - - "minio-data:/minio_data" - "prometheus": - "image": "docker.io/prom/prometheus:v2.53.1" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus" - - "prometheus-data:/prometheus" - "pulsar": - "command": "bin/pulsar standalone" - "image": "docker.io/apachepulsar/pulsar:3.3.0" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-conf:/pulsar/conf" - - "pulsar-data:/pulsar/data" - "pulsar-manager": - "environment": - "SPRING_CONFIGURATION_FILE": "/pulsar-manager/pulsar-manager/application.properties" - "image": "docker.io/apachepulsar/pulsar-manager:v0.3.0" - "ports": - - "9527:9527" - - "7750:7750" - "restart": "on-failure:100" -"volumes": - "cassandra": {} - "etcd": {} - "grafana-storage": {} - "milvus": {} - "minio-data": {} - "prometheus-data": {} - "pulsar-conf": {} - "pulsar-data": {} diff --git a/setup.py b/setup.py index 2e34ad10..6bdb15b6 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import os with open("README.md", "r") as fh: long_description = fh.read() -version = "0.7.2" +version = "0.7.3" setuptools.setup( name="trustgraph", diff --git a/templates/docker-compose.jsonnet b/templates/main.jsonnet similarity index 100% rename from templates/docker-compose.jsonnet rename to templates/main.jsonnet diff --git a/tests/test-llm2 b/tests/test-llm2 new file mode 100755 index 00000000..fe229a68 --- /dev/null +++ b/tests/test-llm2 @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import pulsar +from trustgraph.clients.llm_client import LlmClient + +llm = LlmClient(pulsar_host="pulsar://localhost:6650") + +prompt="What is 2 + 12?" + +try: + resp = llm.request(prompt) + print(resp) +except Exception as e: + print(f"{e.__class__.__name__}: {e}") + diff --git a/tests/test-llm3 b/tests/test-llm3 new file mode 100755 index 00000000..fe229a68 --- /dev/null +++ b/tests/test-llm3 @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import pulsar +from trustgraph.clients.llm_client import LlmClient + +llm = LlmClient(pulsar_host="pulsar://localhost:6650") + +prompt="What is 2 + 12?" + +try: + resp = llm.request(prompt) + print(resp) +except Exception as e: + print(f"{e.__class__.__name__}: {e}") + diff --git a/tg-launch-azure.yaml b/tg-launch-azure-cassandra.yaml similarity index 96% rename from tg-launch-azure.yaml rename to tg-launch-azure-cassandra.yaml index 4ae7e020..a76d16e0 100644 --- a/tg-launch-azure.yaml +++ b/tg-launch-azure-cassandra.yaml @@ -1,21 +1,4 @@ "services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" "chunker": "command": - "${CHUNKER:-chunker-token}" @@ -219,6 +202,24 @@ "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" @@ -347,19 +348,19 @@ "restart": "on-failure:100" "query-triples": "command": - - "triples-query-cassandra" + - "triples-query-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": "cpus": "0.5" - "memory": "512M" + "memory": "128M" "reservations": "cpus": "0.1" - "memory": "512M" + "memory": "128M" "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": @@ -381,11 +382,11 @@ "restart": "on-failure:100" "store-triples": "command": - - "triples-write-cassandra" + - "triples-write-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": @@ -462,11 +463,11 @@ "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "cassandra": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/tg-launch-azure-neo4j.yaml b/tg-launch-azure-neo4j.yaml index d659bd88..a76d16e0 100644 --- a/tg-launch-azure-neo4j.yaml +++ b/tg-launch-azure-neo4j.yaml @@ -1,31 +1,39 @@ "services": - "neo4j": - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" "chunker": "command": - - "chunker-recursive" + - "${CHUNKER:-chunker-token}" - "-p" - "pulsar://pulsar:6650" - "--chunk-size" - - "2000" + - "250" - "--chunk-overlap" - - "100" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "15" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "-m" + - "all-MiniLM-L6-v2" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "etcd": "command": @@ -35,21 +43,37 @@ - "http://0.0.0.0:2379" - "--data-dir" - "/etcd" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "128M" + "reservations": + "cpus": "0.25" + "memory": "128M" "environment": "ETCD_AUTO_COMPACTION_MODE": "revision" "ETCD_AUTO_COMPACTION_RETENTION": "1000" "ETCD_QUOTA_BACKEND_BYTES": "4294967296" "ETCD_SNAPSHOT_COUNT": "50000" - "image": "quay.io/coreos/etcd:v3.5.5" + "image": "quay.io/coreos/etcd:v3.5.15" "ports": - "2379:2379" "restart": "on-failure:100" "volumes": - "etcd:/etcd" "grafana": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" "environment": "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:10.0.0" + "image": "docker.io/grafana/grafana:11.1.4" "ports": - "3000:3000" "restart": "on-failure:100" @@ -67,7 +91,21 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "--entity-limit" + - "50" + - "--triple-limit" + - "30" + - "--max-subgraph-size" + - "3000" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "init-pulsar": "command": @@ -77,31 +115,63 @@ "depends_on": "pulsar": "condition": "service_started" - "image": "docker.io/apachepulsar/pulsar:3.3.0" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/apachepulsar/pulsar:3.3.1" "restart": "on-failure:100" "kg-extract-definitions": "command": - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "milvus": "command": - "milvus" - "run" - "standalone" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" "environment": "ETCD_ENDPOINTS": "etcd:2379" "MINIO_ADDRESS": "minio:9000" - "image": "docker.io/milvusdb/milvus:v2.4.5" + "image": "docker.io/milvusdb/milvus:v2.4.9" "ports": - "9091:9091" - "19530:19530" @@ -115,24 +185,66 @@ - "/minio_data" - "--console-address" - ":9001" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.25" + "memory": "128M" "environment": "MINIO_ROOT_PASSWORD": "minioadmin" "MINIO_ROOT_USER": "minioadmin" - "image": "docker.io/minio/minio:RELEASE.2024-07-04T14-25-45Z" + "image": "docker.io/minio/minio:RELEASE.2024-08-17T01-24-54Z" "ports": - "9001:9001" "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "prometheus": - "image": "docker.io/prom/prometheus:v2.53.1" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/prom/prometheus:v2.53.2" "ports": - "9090:9090" "restart": "on-failure:100" @@ -148,7 +260,15 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "prompt-rag": "command": @@ -163,11 +283,29 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" - "image": "docker.io/apachepulsar/pulsar:3.3.0" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "900M" + "reservations": + "cpus": "0.5" + "memory": "900M" + "environment": + "PULSAR_MEM": "-Xms700M -Xmx700M" + "image": "docker.io/apachepulsar/pulsar:3.3.1" "ports": - "6650:6650" - "8080:8080" @@ -176,9 +314,17 @@ - "pulsar-conf:/pulsar/conf" - "pulsar-data:/pulsar/data" "pulsar-manager": + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" "environment": "SPRING_CONFIGURATION_FILE": "/pulsar-manager/pulsar-manager/application.properties" - "image": "docker.io/apachepulsar/pulsar-manager:v0.3.0" + "image": "docker.io/apachepulsar/pulsar-manager:v0.4.0" "ports": - "9527:9527" - "7750:7750" @@ -190,7 +336,15 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "query-triples": "command": @@ -199,7 +353,15 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -208,7 +370,15 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-triples": "command": @@ -217,55 +387,87 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "text-completion": "command": - "text-completion-azure" - "-p" - "pulsar://pulsar:6650" - # - "-x" - # - "4096" - # - "-t" - # - "0.0" - "-k" - "${AZURE_TOKEN}" - "-e" - "${AZURE_ENDPOINT}" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "-x" + - "4096" + - "-t" + - "0.0" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "text-completion-rag": "command": - "text-completion-azure" - "-p" - "pulsar://pulsar:6650" - # - "-x" - # - "4096" - # - "-t" - # - "0.0" - "-k" - "${AZURE_TOKEN}" - "-e" - "${AZURE_ENDPOINT}" - "-i" + - "-x" + - "4096" + - "-t" + - "0.0" - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "neo4j": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/tg-launch-bedrock.yaml b/tg-launch-bedrock-cassandra.yaml similarity index 96% rename from tg-launch-bedrock.yaml rename to tg-launch-bedrock-cassandra.yaml index a91b9cbe..ebcf1eb8 100644 --- a/tg-launch-bedrock.yaml +++ b/tg-launch-bedrock-cassandra.yaml @@ -1,21 +1,4 @@ "services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" "chunker": "command": - "chunker-recursive" @@ -219,6 +202,24 @@ "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" @@ -347,19 +348,19 @@ "restart": "on-failure:100" "query-triples": "command": - - "triples-query-cassandra" + - "triples-query-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": "cpus": "0.5" - "memory": "512M" + "memory": "128M" "reservations": "cpus": "0.1" - "memory": "512M" + "memory": "128M" "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": @@ -381,11 +382,11 @@ "restart": "on-failure:100" "store-triples": "command": - - "triples-write-cassandra" + - "triples-write-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": @@ -470,11 +471,11 @@ "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "cassandra": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/tg-launch-bedrock-neo4j.yaml b/tg-launch-bedrock-neo4j.yaml index 427090b4..ebcf1eb8 100644 --- a/tg-launch-bedrock-neo4j.yaml +++ b/tg-launch-bedrock-neo4j.yaml @@ -1,31 +1,39 @@ "services": - "neo4j": - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" "chunker": "command": - "chunker-recursive" - "-p" - "pulsar://pulsar:6650" - "--chunk-size" - - "500" + - "2000" - "--chunk-overlap" - - "25" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "100" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "-m" + - "all-MiniLM-L6-v2" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "etcd": "command": @@ -35,21 +43,37 @@ - "http://0.0.0.0:2379" - "--data-dir" - "/etcd" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "128M" + "reservations": + "cpus": "0.25" + "memory": "128M" "environment": "ETCD_AUTO_COMPACTION_MODE": "revision" "ETCD_AUTO_COMPACTION_RETENTION": "1000" "ETCD_QUOTA_BACKEND_BYTES": "4294967296" "ETCD_SNAPSHOT_COUNT": "50000" - "image": "quay.io/coreos/etcd:v3.5.5" + "image": "quay.io/coreos/etcd:v3.5.15" "ports": - "2379:2379" "restart": "on-failure:100" "volumes": - "etcd:/etcd" "grafana": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" "environment": "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:10.0.0" + "image": "docker.io/grafana/grafana:11.1.4" "ports": - "3000:3000" "restart": "on-failure:100" @@ -67,7 +91,21 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "--entity-limit" + - "50" + - "--triple-limit" + - "30" + - "--max-subgraph-size" + - "3000" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "init-pulsar": "command": @@ -77,31 +115,63 @@ "depends_on": "pulsar": "condition": "service_started" - "image": "docker.io/apachepulsar/pulsar:3.3.0" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/apachepulsar/pulsar:3.3.1" "restart": "on-failure:100" "kg-extract-definitions": "command": - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "milvus": "command": - "milvus" - "run" - "standalone" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" "environment": "ETCD_ENDPOINTS": "etcd:2379" "MINIO_ADDRESS": "minio:9000" - "image": "docker.io/milvusdb/milvus:v2.4.5" + "image": "docker.io/milvusdb/milvus:v2.4.9" "ports": - "9091:9091" - "19530:19530" @@ -115,24 +185,66 @@ - "/minio_data" - "--console-address" - ":9001" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.25" + "memory": "128M" "environment": "MINIO_ROOT_PASSWORD": "minioadmin" "MINIO_ROOT_USER": "minioadmin" - "image": "docker.io/minio/minio:RELEASE.2024-07-04T14-25-45Z" + "image": "docker.io/minio/minio:RELEASE.2024-08-17T01-24-54Z" "ports": - "9001:9001" "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "prometheus": - "image": "docker.io/prom/prometheus:v2.53.1" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/prom/prometheus:v2.53.2" "ports": - "9090:9090" "restart": "on-failure:100" @@ -148,7 +260,15 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "prompt-rag": "command": @@ -163,11 +283,29 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" - "image": "docker.io/apachepulsar/pulsar:3.3.0" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "900M" + "reservations": + "cpus": "0.5" + "memory": "900M" + "environment": + "PULSAR_MEM": "-Xms700M -Xmx700M" + "image": "docker.io/apachepulsar/pulsar:3.3.1" "ports": - "6650:6650" - "8080:8080" @@ -176,9 +314,17 @@ - "pulsar-conf:/pulsar/conf" - "pulsar-data:/pulsar/data" "pulsar-manager": + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" "environment": "SPRING_CONFIGURATION_FILE": "/pulsar-manager/pulsar-manager/application.properties" - "image": "docker.io/apachepulsar/pulsar-manager:v0.3.0" + "image": "docker.io/apachepulsar/pulsar-manager:v0.4.0" "ports": - "9527:9527" - "7750:7750" @@ -190,7 +336,15 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "query-triples": "command": @@ -199,7 +353,15 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -208,7 +370,15 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-triples": "command": @@ -217,63 +387,95 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "text-completion": "command": - "text-completion-bedrock" - "-p" - "pulsar://pulsar:6650" - # - "-x" - # - "4096" - # - "-t" - # - "0.0" - # - "-m" - # - "mistral.mixtral-8x7b-instruct-v0:1" - "-z" - "${AWS_ID_KEY}" - "-k" - "${AWS_SECRET_KEY}" - "-r" - "us-west-2" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "-x" + - "4096" + - "-t" + - "0.0" + - "-m" + - "mistral.mixtral-8x7b-instruct-v0:1" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "text-completion-rag": "command": - "text-completion-bedrock" - "-p" - "pulsar://pulsar:6650" - # - "-x" - # - "4096" - # - "-t" - # - "0.0" - # - "-m" - # - "mistral.mixtral-8x7b-instruct-v0:1" - "-z" - "${AWS_ID_KEY}" - "-k" - "${AWS_SECRET_KEY}" - "-r" - "us-west-2" + - "-x" + - "4096" + - "-t" + - "0.0" + - "-m" + - "mistral.mixtral-8x7b-instruct-v0:1" - "-i" - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "neo4j": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/tg-launch-claude.yaml b/tg-launch-claude-cassandra.yaml similarity index 96% rename from tg-launch-claude.yaml rename to tg-launch-claude-cassandra.yaml index 17e8f50e..9d18fd49 100644 --- a/tg-launch-claude.yaml +++ b/tg-launch-claude-cassandra.yaml @@ -1,21 +1,4 @@ "services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" "chunker": "command": - "${CHUNKER:-chunker-token}" @@ -219,6 +202,24 @@ "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" @@ -347,19 +348,19 @@ "restart": "on-failure:100" "query-triples": "command": - - "triples-query-cassandra" + - "triples-query-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": "cpus": "0.5" - "memory": "512M" + "memory": "128M" "reservations": "cpus": "0.1" - "memory": "512M" + "memory": "128M" "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": @@ -381,11 +382,11 @@ "restart": "on-failure:100" "store-triples": "command": - - "triples-write-cassandra" + - "triples-write-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": @@ -458,11 +459,11 @@ "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "cassandra": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/tg-launch-claude-neo4j.yaml b/tg-launch-claude-neo4j.yaml index 133a0d59..9d18fd49 100644 --- a/tg-launch-claude-neo4j.yaml +++ b/tg-launch-claude-neo4j.yaml @@ -1,31 +1,39 @@ "services": - "neo4j": - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" "chunker": "command": - - "chunker-recursive" + - "${CHUNKER:-chunker-token}" - "-p" - "pulsar://pulsar:6650" - "--chunk-size" - - "2000" + - "250" - "--chunk-overlap" - - "100" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "15" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "-m" + - "all-MiniLM-L6-v2" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "etcd": "command": @@ -35,21 +43,37 @@ - "http://0.0.0.0:2379" - "--data-dir" - "/etcd" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "128M" + "reservations": + "cpus": "0.25" + "memory": "128M" "environment": "ETCD_AUTO_COMPACTION_MODE": "revision" "ETCD_AUTO_COMPACTION_RETENTION": "1000" "ETCD_QUOTA_BACKEND_BYTES": "4294967296" "ETCD_SNAPSHOT_COUNT": "50000" - "image": "quay.io/coreos/etcd:v3.5.5" + "image": "quay.io/coreos/etcd:v3.5.15" "ports": - "2379:2379" "restart": "on-failure:100" "volumes": - "etcd:/etcd" "grafana": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" "environment": "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:10.0.0" + "image": "docker.io/grafana/grafana:11.1.4" "ports": - "3000:3000" "restart": "on-failure:100" @@ -67,7 +91,21 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "--entity-limit" + - "50" + - "--triple-limit" + - "30" + - "--max-subgraph-size" + - "3000" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "init-pulsar": "command": @@ -77,31 +115,63 @@ "depends_on": "pulsar": "condition": "service_started" - "image": "docker.io/apachepulsar/pulsar:3.3.0" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/apachepulsar/pulsar:3.3.1" "restart": "on-failure:100" "kg-extract-definitions": "command": - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "milvus": "command": - "milvus" - "run" - "standalone" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" "environment": "ETCD_ENDPOINTS": "etcd:2379" "MINIO_ADDRESS": "minio:9000" - "image": "docker.io/milvusdb/milvus:v2.4.5" + "image": "docker.io/milvusdb/milvus:v2.4.9" "ports": - "9091:9091" - "19530:19530" @@ -115,24 +185,66 @@ - "/minio_data" - "--console-address" - ":9001" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.25" + "memory": "128M" "environment": "MINIO_ROOT_PASSWORD": "minioadmin" "MINIO_ROOT_USER": "minioadmin" - "image": "docker.io/minio/minio:RELEASE.2024-07-04T14-25-45Z" + "image": "docker.io/minio/minio:RELEASE.2024-08-17T01-24-54Z" "ports": - "9001:9001" "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "prometheus": - "image": "docker.io/prom/prometheus:v2.53.1" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/prom/prometheus:v2.53.2" "ports": - "9090:9090" "restart": "on-failure:100" @@ -148,7 +260,15 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "prompt-rag": "command": @@ -163,11 +283,29 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" - "image": "docker.io/apachepulsar/pulsar:3.3.0" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "900M" + "reservations": + "cpus": "0.5" + "memory": "900M" + "environment": + "PULSAR_MEM": "-Xms700M -Xmx700M" + "image": "docker.io/apachepulsar/pulsar:3.3.1" "ports": - "6650:6650" - "8080:8080" @@ -176,9 +314,17 @@ - "pulsar-conf:/pulsar/conf" - "pulsar-data:/pulsar/data" "pulsar-manager": + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" "environment": "SPRING_CONFIGURATION_FILE": "/pulsar-manager/pulsar-manager/application.properties" - "image": "docker.io/apachepulsar/pulsar-manager:v0.3.0" + "image": "docker.io/apachepulsar/pulsar-manager:v0.4.0" "ports": - "9527:9527" - "7750:7750" @@ -190,7 +336,15 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "query-triples": "command": @@ -199,7 +353,15 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -208,7 +370,15 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-triples": "command": @@ -217,51 +387,83 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "text-completion": "command": - "text-completion-claude" - "-p" - "pulsar://pulsar:6650" - # - "-x" - # - "4096" - # - "-t" - # - "0.0" - "-k" - "${CLAUDE_KEY}" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "-x" + - "4096" + - "-t" + - "0.0" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "text-completion-rag": "command": - "text-completion-claude" - "-p" - "pulsar://pulsar:6650" - # - "-x" - # - "4096" - # - "-t" - # - "0.0" - "-k" - "${CLAUDE_KEY}" + - "-x" + - "4096" + - "-t" + - "0.0" - "-i" - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "neo4j": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/tg-launch-cohere.yaml b/tg-launch-cohere-cassandra.yaml similarity index 96% rename from tg-launch-cohere.yaml rename to tg-launch-cohere-cassandra.yaml index 694b9df9..a11873d1 100644 --- a/tg-launch-cohere.yaml +++ b/tg-launch-cohere-cassandra.yaml @@ -1,21 +1,4 @@ "services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" "chunker": "command": - "${CHUNKER:-chunker-token}" @@ -219,6 +202,24 @@ "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" @@ -347,19 +348,19 @@ "restart": "on-failure:100" "query-triples": "command": - - "triples-query-cassandra" + - "triples-query-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": "cpus": "0.5" - "memory": "512M" + "memory": "128M" "reservations": "cpus": "0.1" - "memory": "512M" + "memory": "128M" "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": @@ -381,11 +382,11 @@ "restart": "on-failure:100" "store-triples": "command": - - "triples-write-cassandra" + - "triples-write-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": @@ -454,11 +455,11 @@ "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "cassandra": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/tg-launch-cohere-neo4j.yaml b/tg-launch-cohere-neo4j.yaml index ee755bec..a11873d1 100644 --- a/tg-launch-cohere-neo4j.yaml +++ b/tg-launch-cohere-neo4j.yaml @@ -1,31 +1,39 @@ "services": - "neo4j": - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" "chunker": "command": - - "chunker-recursive" + - "${CHUNKER:-chunker-token}" - "-p" - "pulsar://pulsar:6650" - "--chunk-size" - - "1000" + - "150" - "--chunk-overlap" - - "50" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "10" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "-m" + - "all-MiniLM-L6-v2" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "etcd": "command": @@ -35,21 +43,37 @@ - "http://0.0.0.0:2379" - "--data-dir" - "/etcd" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "128M" + "reservations": + "cpus": "0.25" + "memory": "128M" "environment": "ETCD_AUTO_COMPACTION_MODE": "revision" "ETCD_AUTO_COMPACTION_RETENTION": "1000" "ETCD_QUOTA_BACKEND_BYTES": "4294967296" "ETCD_SNAPSHOT_COUNT": "50000" - "image": "quay.io/coreos/etcd:v3.5.5" + "image": "quay.io/coreos/etcd:v3.5.15" "ports": - "2379:2379" "restart": "on-failure:100" "volumes": - "etcd:/etcd" "grafana": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" "environment": "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:10.0.0" + "image": "docker.io/grafana/grafana:11.1.4" "ports": - "3000:3000" "restart": "on-failure:100" @@ -67,7 +91,21 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "--entity-limit" + - "50" + - "--triple-limit" + - "30" + - "--max-subgraph-size" + - "3000" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "init-pulsar": "command": @@ -77,31 +115,63 @@ "depends_on": "pulsar": "condition": "service_started" - "image": "docker.io/apachepulsar/pulsar:3.3.0" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/apachepulsar/pulsar:3.3.1" "restart": "on-failure:100" "kg-extract-definitions": "command": - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "milvus": "command": - "milvus" - "run" - "standalone" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" "environment": "ETCD_ENDPOINTS": "etcd:2379" "MINIO_ADDRESS": "minio:9000" - "image": "docker.io/milvusdb/milvus:v2.4.5" + "image": "docker.io/milvusdb/milvus:v2.4.9" "ports": - "9091:9091" - "19530:19530" @@ -115,24 +185,66 @@ - "/minio_data" - "--console-address" - ":9001" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.25" + "memory": "128M" "environment": "MINIO_ROOT_PASSWORD": "minioadmin" "MINIO_ROOT_USER": "minioadmin" - "image": "docker.io/minio/minio:RELEASE.2024-07-04T14-25-45Z" + "image": "docker.io/minio/minio:RELEASE.2024-08-17T01-24-54Z" "ports": - "9001:9001" "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "prometheus": - "image": "docker.io/prom/prometheus:v2.53.1" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/prom/prometheus:v2.53.2" "ports": - "9090:9090" "restart": "on-failure:100" @@ -148,7 +260,15 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "prompt-rag": "command": @@ -163,11 +283,29 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" - "image": "docker.io/apachepulsar/pulsar:3.3.0" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "900M" + "reservations": + "cpus": "0.5" + "memory": "900M" + "environment": + "PULSAR_MEM": "-Xms700M -Xmx700M" + "image": "docker.io/apachepulsar/pulsar:3.3.1" "ports": - "6650:6650" - "8080:8080" @@ -176,9 +314,17 @@ - "pulsar-conf:/pulsar/conf" - "pulsar-data:/pulsar/data" "pulsar-manager": + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" "environment": "SPRING_CONFIGURATION_FILE": "/pulsar-manager/pulsar-manager/application.properties" - "image": "docker.io/apachepulsar/pulsar-manager:v0.3.0" + "image": "docker.io/apachepulsar/pulsar-manager:v0.4.0" "ports": - "9527:9527" - "7750:7750" @@ -190,7 +336,15 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "query-triples": "command": @@ -199,7 +353,15 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -208,7 +370,15 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-triples": "command": @@ -217,51 +387,79 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "text-completion": "command": - "text-completion-cohere" - "-p" - "pulsar://pulsar:6650" - # - "-l" - # - "4096" - # - "-t" - # - "0.0" - "-k" - "${COHERE_KEY}" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "-t" + - "0.0" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "text-completion-rag": "command": - "text-completion-cohere" - "-p" - "pulsar://pulsar:6650" - # - "-l" - # - "4096" - # - "-t" - # - "0.0" - "-k" - "${COHERE_KEY}" + - "-t" + - "0.0" - "-i" - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "neo4j": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/tg-launch-mix-neo4j.yaml b/tg-launch-mix-neo4j.yaml deleted file mode 100644 index c350974b..00000000 --- a/tg-launch-mix-neo4j.yaml +++ /dev/null @@ -1,271 +0,0 @@ -"services": - "neo4j": - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" - "chunker": - "command": - - "chunker-recursive" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "2000" - - "--chunk-overlap" - - "100" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "etcd": - "command": - - "etcd" - - "-advertise-client-urls=http://127.0.0.1:2379" - - "-listen-client-urls" - - "http://0.0.0.0:2379" - - "--data-dir" - - "/etcd" - "environment": - "ETCD_AUTO_COMPACTION_MODE": "revision" - "ETCD_AUTO_COMPACTION_RETENTION": "1000" - "ETCD_QUOTA_BACKEND_BYTES": "4294967296" - "ETCD_SNAPSHOT_COUNT": "50000" - "image": "quay.io/coreos/etcd:v3.5.5" - "ports": - - "2379:2379" - "restart": "on-failure:100" - "volumes": - - "etcd:/etcd" - "grafana": - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:10.0.0" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/dashboard.yml" - - "./grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml" - - "./grafana/dashboard.json:/var/lib/grafana/dashboards/dashboard.json" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "pulsar-admin --admin-url http://pulsar:8080 tenants create tg && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response && pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response" - "depends_on": - "pulsar": - "condition": "service_started" - "image": "docker.io/apachepulsar/pulsar:3.3.0" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-p" - - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-p" - - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "milvus": - "command": - - "milvus" - - "run" - - "standalone" - "environment": - "ETCD_ENDPOINTS": "etcd:2379" - "MINIO_ADDRESS": "minio:9000" - "image": "docker.io/milvusdb/milvus:v2.4.5" - "ports": - - "9091:9091" - - "19530:19530" - "restart": "on-failure:100" - "volumes": - - "milvus:/var/lib/milvus" - "minio": - "command": - - "minio" - - "server" - - "/minio_data" - - "--console-address" - - ":9001" - "environment": - "MINIO_ROOT_PASSWORD": "minioadmin" - "MINIO_ROOT_USER": "minioadmin" - "image": "docker.io/minio/minio:RELEASE.2024-07-04T14-25-45Z" - "ports": - - "9001:9001" - "restart": "on-failure:100" - "volumes": - - "minio-data:/minio_data" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-p" - - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "prometheus": - "image": "docker.io/prom/prometheus:v2.53.1" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-generic" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-generic" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "pulsar": - "command": "bin/pulsar standalone" - "image": "docker.io/apachepulsar/pulsar:3.3.0" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-conf:/pulsar/conf" - - "pulsar-data:/pulsar/data" - "pulsar-manager": - "environment": - "SPRING_CONFIGURATION_FILE": "/pulsar-manager/pulsar-manager/application.properties" - "image": "docker.io/apachepulsar/pulsar-manager:v0.3.0" - "ports": - - "9527:9527" - - "7750:7750" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-milvus" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-milvus" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-neo4j" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-cohere" - - "-p" - - "pulsar://pulsar:6650" - # - "-l" - # - "4096" - # - "-t" - # - "0.0" - - "-k" - - "${COHERE_KEY}" - - "-m" - - "c4ai-aya-23-35b" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-cohere" - - "-p" - - "pulsar://pulsar:6650" - # - "-l" - # - "4096" - # - "-t" - # - "0.0" - - "-k" - - "${COHERE_KEY}" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - - "-m" - - "c4ai-aya-23-8b" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" - "restart": "on-failure:100" -"volumes": - "neo4j": {} - "etcd": {} - "grafana-storage": {} - "milvus": {} - "minio-data": {} - "prometheus-data": {} - "pulsar-conf": {} - "pulsar-data": {} diff --git a/tg-launch-mix.yaml b/tg-launch-mix.yaml deleted file mode 100644 index bbeff922..00000000 --- a/tg-launch-mix.yaml +++ /dev/null @@ -1,440 +0,0 @@ -"services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" - "chunker": - "command": - - "chunker-recursive" - - "-p" - - "pulsar://pulsar:6650" - - "--chunk-size" - - "4000" - - "--chunk-overlap" - - "120" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "embeddings": - "command": - - "embeddings-hf" - - "-p" - - "pulsar://pulsar:6650" - - "-m" - - "all-MiniLM-L6-v2" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "etcd": - "command": - - "etcd" - - "-advertise-client-urls=http://127.0.0.1:2379" - - "-listen-client-urls" - - "http://0.0.0.0:2379" - - "--data-dir" - - "/etcd" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "128M" - "reservations": - "cpus": "0.25" - "memory": "128M" - "environment": - "ETCD_AUTO_COMPACTION_MODE": "revision" - "ETCD_AUTO_COMPACTION_RETENTION": "1000" - "ETCD_QUOTA_BACKEND_BYTES": "4294967296" - "ETCD_SNAPSHOT_COUNT": "50000" - "image": "quay.io/coreos/etcd:v3.5.15" - "ports": - - "2379:2379" - "restart": "on-failure:100" - "volumes": - - "etcd:/etcd" - "grafana": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:11.1.4" - "ports": - - "3000:3000" - "restart": "on-failure:100" - "volumes": - - "grafana-storage:/var/lib/grafana" - - "./grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/dashboard.yml" - - "./grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml" - - "./grafana/dashboard.json:/var/lib/grafana/dashboards/dashboard.json" - "graph-rag": - "command": - - "graph-rag" - - "-p" - - "pulsar://pulsar:6650" - - "--prompt-request-queue" - - "non-persistent://tg/request/prompt-rag" - - "--prompt-response-queue" - - "non-persistent://tg/response/prompt-rag-response" - - "--entity-limit" - - "50" - - "--triple-limit" - - "30" - - "--max-subgraph-size" - - "3000" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "init-pulsar": - "command": - - "sh" - - "-c" - - "pulsar-admin --admin-url http://pulsar:8080 tenants create tg && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response && pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response" - "depends_on": - "pulsar": - "condition": "service_started" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "restart": "on-failure:100" - "kg-extract-definitions": - "command": - - "kg-extract-definitions" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "kg-extract-relationships": - "command": - - "kg-extract-relationships" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "milvus": - "command": - - "milvus" - - "run" - - "standalone" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "256M" - "reservations": - "cpus": "0.5" - "memory": "256M" - "environment": - "ETCD_ENDPOINTS": "etcd:2379" - "MINIO_ADDRESS": "minio:9000" - "image": "docker.io/milvusdb/milvus:v2.4.9" - "ports": - - "9091:9091" - - "19530:19530" - "restart": "on-failure:100" - "volumes": - - "milvus:/var/lib/milvus" - "minio": - "command": - - "minio" - - "server" - - "/minio_data" - - "--console-address" - - ":9001" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.25" - "memory": "128M" - "environment": - "MINIO_ROOT_PASSWORD": "minioadmin" - "MINIO_ROOT_USER": "minioadmin" - "image": "docker.io/minio/minio:RELEASE.2024-08-17T01-24-54Z" - "ports": - - "9001:9001" - "restart": "on-failure:100" - "volumes": - - "minio-data:/minio_data" - "pdf-decoder": - "command": - - "pdf-decoder" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "prometheus": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/prom/prometheus:v2.53.2" - "ports": - - "9090:9090" - "restart": "on-failure:100" - "volumes": - - "./prometheus:/etc/prometheus" - - "prometheus-data:/prometheus" - "prompt": - "command": - - "prompt-generic" - - "-p" - - "pulsar://pulsar:6650" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "prompt-rag": - "command": - - "prompt-generic" - - "-p" - - "pulsar://pulsar:6650" - - "-i" - - "non-persistent://tg/request/prompt-rag" - - "-o" - - "non-persistent://tg/response/prompt-rag-response" - - "--text-completion-request-queue" - - "non-persistent://tg/request/text-completion-rag" - - "--text-completion-response-queue" - - "non-persistent://tg/response/text-completion-rag-response" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "pulsar": - "command": "bin/pulsar standalone" - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "900M" - "reservations": - "cpus": "0.5" - "memory": "900M" - "environment": - "PULSAR_MEM": "-Xms700M -Xmx700M" - "image": "docker.io/apachepulsar/pulsar:3.3.1" - "ports": - - "6650:6650" - - "8080:8080" - "restart": "on-failure:100" - "volumes": - - "pulsar-conf:/pulsar/conf" - - "pulsar-data:/pulsar/data" - "pulsar-manager": - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "environment": - "SPRING_CONFIGURATION_FILE": "/pulsar-manager/pulsar-manager/application.properties" - "image": "docker.io/apachepulsar/pulsar-manager:v0.4.0" - "ports": - - "9527:9527" - - "7750:7750" - "restart": "on-failure:100" - "query-graph-embeddings": - "command": - - "ge-query-milvus" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://milvus:19530" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "query-triples": - "command": - - "triples-query-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "512M" - "reservations": - "cpus": "0.1" - "memory": "512M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "store-graph-embeddings": - "command": - - "ge-write-milvus" - - "-p" - - "pulsar://pulsar:6650" - - "-t" - - "http://milvus:19530" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "store-triples": - "command": - - "triples-write-cassandra" - - "-p" - - "pulsar://pulsar:6650" - - "-g" - - "cassandra" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "text-completion": - "command": - - "text-completion-cohere" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${COHERE_KEY}" - - "-m" - - "c4ai-aya-23-35b" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "text-completion-rag": - "command": - - "text-completion-cohere" - - "-p" - - "pulsar://pulsar:6650" - - "-k" - - "${COHERE_KEY}" - - "-i" - - "non-persistent://tg/request/text-completion-rag" - - "-o" - - "non-persistent://tg/response/text-completion-rag-response" - - "-m" - - "c4ai-aya-23-8b" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" - "vectorize": - "command": - - "embeddings-vectorize" - - "-p" - - "pulsar://pulsar:6650" - "deploy": - "resources": - "limits": - "cpus": "0.5" - "memory": "128M" - "reservations": - "cpus": "0.1" - "memory": "128M" - "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" - "restart": "on-failure:100" -"volumes": - "cassandra": {} - "etcd": {} - "grafana-storage": {} - "milvus": {} - "minio-data": {} - "prometheus-data": {} - "pulsar-conf": {} - "pulsar-data": {} diff --git a/tg-launch-ollama.yaml b/tg-launch-ollama-cassandra.yaml similarity index 96% rename from tg-launch-ollama.yaml rename to tg-launch-ollama-cassandra.yaml index 06fd13bc..37e0f0cc 100644 --- a/tg-launch-ollama.yaml +++ b/tg-launch-ollama-cassandra.yaml @@ -1,21 +1,4 @@ "services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" "chunker": "command": - "${CHUNKER:-chunker-token}" @@ -219,6 +202,24 @@ "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" @@ -347,19 +348,19 @@ "restart": "on-failure:100" "query-triples": "command": - - "triples-query-cassandra" + - "triples-query-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": "cpus": "0.5" - "memory": "512M" + "memory": "128M" "reservations": "cpus": "0.1" - "memory": "512M" + "memory": "128M" "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": @@ -381,11 +382,11 @@ "restart": "on-failure:100" "store-triples": "command": - - "triples-write-cassandra" + - "triples-write-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": @@ -454,11 +455,11 @@ "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "cassandra": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/tg-launch-ollama-neo4j.yaml b/tg-launch-ollama-neo4j.yaml index 167bfc26..37e0f0cc 100644 --- a/tg-launch-ollama-neo4j.yaml +++ b/tg-launch-ollama-neo4j.yaml @@ -1,31 +1,39 @@ "services": - "neo4j": - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" "chunker": "command": - - "chunker-recursive" + - "${CHUNKER:-chunker-token}" - "-p" - "pulsar://pulsar:6650" - "--chunk-size" - - "2000" + - "250" - "--chunk-overlap" - - "100" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "15" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "-m" + - "all-MiniLM-L6-v2" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "etcd": "command": @@ -35,21 +43,37 @@ - "http://0.0.0.0:2379" - "--data-dir" - "/etcd" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "128M" + "reservations": + "cpus": "0.25" + "memory": "128M" "environment": "ETCD_AUTO_COMPACTION_MODE": "revision" "ETCD_AUTO_COMPACTION_RETENTION": "1000" "ETCD_QUOTA_BACKEND_BYTES": "4294967296" "ETCD_SNAPSHOT_COUNT": "50000" - "image": "quay.io/coreos/etcd:v3.5.5" + "image": "quay.io/coreos/etcd:v3.5.15" "ports": - "2379:2379" "restart": "on-failure:100" "volumes": - "etcd:/etcd" "grafana": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" "environment": "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:10.0.0" + "image": "docker.io/grafana/grafana:11.1.4" "ports": - "3000:3000" "restart": "on-failure:100" @@ -67,7 +91,21 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "--entity-limit" + - "50" + - "--triple-limit" + - "30" + - "--max-subgraph-size" + - "3000" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "init-pulsar": "command": @@ -77,31 +115,63 @@ "depends_on": "pulsar": "condition": "service_started" - "image": "docker.io/apachepulsar/pulsar:3.3.0" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/apachepulsar/pulsar:3.3.1" "restart": "on-failure:100" "kg-extract-definitions": "command": - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "milvus": "command": - "milvus" - "run" - "standalone" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" "environment": "ETCD_ENDPOINTS": "etcd:2379" "MINIO_ADDRESS": "minio:9000" - "image": "docker.io/milvusdb/milvus:v2.4.5" + "image": "docker.io/milvusdb/milvus:v2.4.9" "ports": - "9091:9091" - "19530:19530" @@ -115,24 +185,66 @@ - "/minio_data" - "--console-address" - ":9001" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.25" + "memory": "128M" "environment": "MINIO_ROOT_PASSWORD": "minioadmin" "MINIO_ROOT_USER": "minioadmin" - "image": "docker.io/minio/minio:RELEASE.2024-07-04T14-25-45Z" + "image": "docker.io/minio/minio:RELEASE.2024-08-17T01-24-54Z" "ports": - "9001:9001" "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "prometheus": - "image": "docker.io/prom/prometheus:v2.53.1" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/prom/prometheus:v2.53.2" "ports": - "9090:9090" "restart": "on-failure:100" @@ -148,7 +260,15 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "prompt-rag": "command": @@ -163,11 +283,29 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" - "image": "docker.io/apachepulsar/pulsar:3.3.0" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "900M" + "reservations": + "cpus": "0.5" + "memory": "900M" + "environment": + "PULSAR_MEM": "-Xms700M -Xmx700M" + "image": "docker.io/apachepulsar/pulsar:3.3.1" "ports": - "6650:6650" - "8080:8080" @@ -176,9 +314,17 @@ - "pulsar-conf:/pulsar/conf" - "pulsar-data:/pulsar/data" "pulsar-manager": + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" "environment": "SPRING_CONFIGURATION_FILE": "/pulsar-manager/pulsar-manager/application.properties" - "image": "docker.io/apachepulsar/pulsar-manager:v0.3.0" + "image": "docker.io/apachepulsar/pulsar-manager:v0.4.0" "ports": - "9527:9527" - "7750:7750" @@ -190,7 +336,15 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "query-triples": "command": @@ -199,7 +353,15 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -208,7 +370,15 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-triples": "command": @@ -217,43 +387,79 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "text-completion": "command": - "text-completion-ollama" - "-p" - "pulsar://pulsar:6650" + - "-m" + - "gemma2:9b" - "-r" - "${OLLAMA_HOST}" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "text-completion-rag": "command": - "text-completion-ollama" - "-p" - "pulsar://pulsar:6650" + - "-m" + - "gemma2:9b" - "-r" - "${OLLAMA_HOST}" - "-i" - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "vectorize": "command": - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "neo4j": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/tg-launch-openai.yaml b/tg-launch-openai-cassandra.yaml similarity index 96% rename from tg-launch-openai.yaml rename to tg-launch-openai-cassandra.yaml index 1c07e2f3..40ae1eff 100644 --- a/tg-launch-openai.yaml +++ b/tg-launch-openai-cassandra.yaml @@ -1,21 +1,4 @@ "services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" "chunker": "command": - "${CHUNKER:-chunker-token}" @@ -219,6 +202,24 @@ "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" @@ -347,19 +348,19 @@ "restart": "on-failure:100" "query-triples": "command": - - "triples-query-cassandra" + - "triples-query-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": "cpus": "0.5" - "memory": "512M" + "memory": "128M" "reservations": "cpus": "0.1" - "memory": "512M" + "memory": "128M" "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": @@ -381,11 +382,11 @@ "restart": "on-failure:100" "store-triples": "command": - - "triples-write-cassandra" + - "triples-write-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": @@ -458,11 +459,11 @@ "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "cassandra": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/tg-launch-vertexai.yaml b/tg-launch-vertexai-cassandra.yaml similarity index 96% rename from tg-launch-vertexai.yaml rename to tg-launch-vertexai-cassandra.yaml index 18b58667..ddd725ab 100644 --- a/tg-launch-vertexai.yaml +++ b/tg-launch-vertexai-cassandra.yaml @@ -1,21 +1,4 @@ "services": - "cassandra": - "deploy": - "resources": - "limits": - "cpus": "1.0" - "memory": "512M" - "reservations": - "cpus": "0.5" - "memory": "512M" - "environment": - "JVM_OPTS": "-Xms256M -Xmx256M" - "image": "docker.io/cassandra:4.1.6" - "ports": - - "9042:9042" - "restart": "on-failure:100" - "volumes": - - "cassandra:/var/lib/cassandra" "chunker": "command": - "${CHUNKER:-chunker-token}" @@ -219,6 +202,24 @@ "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" @@ -347,19 +348,19 @@ "restart": "on-failure:100" "query-triples": "command": - - "triples-query-cassandra" + - "triples-query-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": "cpus": "0.5" - "memory": "512M" + "memory": "128M" "reservations": "cpus": "0.1" - "memory": "512M" + "memory": "128M" "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": @@ -381,11 +382,11 @@ "restart": "on-failure:100" "store-triples": "command": - - "triples-write-cassandra" + - "triples-write-neo4j" - "-p" - "pulsar://pulsar:6650" - "-g" - - "cassandra" + - "bolt://neo4j:7687" "deploy": "resources": "limits": @@ -466,11 +467,11 @@ "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "cassandra": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/tg-launch-vertexai-neo4j.yaml b/tg-launch-vertexai-neo4j.yaml index cf99cd27..ddd725ab 100644 --- a/tg-launch-vertexai-neo4j.yaml +++ b/tg-launch-vertexai-neo4j.yaml @@ -1,31 +1,39 @@ "services": - "neo4j": - "environment": - "NEO4J_AUTH": "neo4j/password" - "image": "docker.io/neo4j:5.22.0-community-bullseye" - "ports": - - "7474:7474" - - "7687:7687" - "restart": "on-failure:100" - "volumes": - - "neo4j:/data" "chunker": "command": - - "chunker-recursive" + - "${CHUNKER:-chunker-token}" - "-p" - "pulsar://pulsar:6650" - "--chunk-size" - - "2000" + - "250" - "--chunk-overlap" - - "100" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "15" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "embeddings": "command": - "embeddings-hf" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "-m" + - "all-MiniLM-L6-v2" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "etcd": "command": @@ -35,21 +43,37 @@ - "http://0.0.0.0:2379" - "--data-dir" - "/etcd" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "128M" + "reservations": + "cpus": "0.25" + "memory": "128M" "environment": "ETCD_AUTO_COMPACTION_MODE": "revision" "ETCD_AUTO_COMPACTION_RETENTION": "1000" "ETCD_QUOTA_BACKEND_BYTES": "4294967296" "ETCD_SNAPSHOT_COUNT": "50000" - "image": "quay.io/coreos/etcd:v3.5.5" + "image": "quay.io/coreos/etcd:v3.5.15" "ports": - "2379:2379" "restart": "on-failure:100" "volumes": - "etcd:/etcd" "grafana": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" "environment": "GF_ORG_NAME": "trustgraph.ai" - "image": "docker.io/grafana/grafana:10.0.0" + "image": "docker.io/grafana/grafana:11.1.4" "ports": - "3000:3000" "restart": "on-failure:100" @@ -67,7 +91,21 @@ - "non-persistent://tg/request/prompt-rag" - "--prompt-response-queue" - "non-persistent://tg/response/prompt-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "--entity-limit" + - "50" + - "--triple-limit" + - "30" + - "--max-subgraph-size" + - "3000" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "init-pulsar": "command": @@ -77,31 +115,63 @@ "depends_on": "pulsar": "condition": "service_started" - "image": "docker.io/apachepulsar/pulsar:3.3.0" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/apachepulsar/pulsar:3.3.1" "restart": "on-failure:100" "kg-extract-definitions": "command": - "kg-extract-definitions" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "kg-extract-relationships": "command": - "kg-extract-relationships" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "milvus": "command": - "milvus" - "run" - "standalone" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" "environment": "ETCD_ENDPOINTS": "etcd:2379" "MINIO_ADDRESS": "minio:9000" - "image": "docker.io/milvusdb/milvus:v2.4.5" + "image": "docker.io/milvusdb/milvus:v2.4.9" "ports": - "9091:9091" - "19530:19530" @@ -115,24 +185,66 @@ - "/minio_data" - "--console-address" - ":9001" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.25" + "memory": "128M" "environment": "MINIO_ROOT_PASSWORD": "minioadmin" "MINIO_ROOT_USER": "minioadmin" - "image": "docker.io/minio/minio:RELEASE.2024-07-04T14-25-45Z" + "image": "docker.io/minio/minio:RELEASE.2024-08-17T01-24-54Z" "ports": - "9001:9001" "restart": "on-failure:100" "volumes": - "minio-data:/minio_data" + "neo4j": + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "256M" + "reservations": + "cpus": "0.5" + "memory": "256M" + "environment": + "NEO4J_AUTH": "neo4j/password" + "image": "docker.io/neo4j:5.22.0-community-bullseye" + "ports": + - "7474:7474" + - "7687:7687" + "restart": "on-failure:100" + "volumes": + - "neo4j:/data" "pdf-decoder": "command": - "pdf-decoder" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "prometheus": - "image": "docker.io/prom/prometheus:v2.53.1" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/prom/prometheus:v2.53.2" "ports": - "9090:9090" "restart": "on-failure:100" @@ -148,7 +260,15 @@ - "non-persistent://tg/request/text-completion" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "prompt-rag": "command": @@ -163,11 +283,29 @@ - "non-persistent://tg/request/text-completion-rag" - "--text-completion-response-queue" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "pulsar": "command": "bin/pulsar standalone" - "image": "docker.io/apachepulsar/pulsar:3.3.0" + "deploy": + "resources": + "limits": + "cpus": "1.0" + "memory": "900M" + "reservations": + "cpus": "0.5" + "memory": "900M" + "environment": + "PULSAR_MEM": "-Xms700M -Xmx700M" + "image": "docker.io/apachepulsar/pulsar:3.3.1" "ports": - "6650:6650" - "8080:8080" @@ -176,9 +314,17 @@ - "pulsar-conf:/pulsar/conf" - "pulsar-data:/pulsar/data" "pulsar-manager": + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" "environment": "SPRING_CONFIGURATION_FILE": "/pulsar-manager/pulsar-manager/application.properties" - "image": "docker.io/apachepulsar/pulsar-manager:v0.3.0" + "image": "docker.io/apachepulsar/pulsar-manager:v0.4.0" "ports": - "9527:9527" - "7750:7750" @@ -190,7 +336,15 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "query-triples": "command": @@ -199,7 +353,15 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-graph-embeddings": "command": @@ -208,7 +370,15 @@ - "pulsar://pulsar:6650" - "-t" - "http://milvus:19530" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "store-triples": "command": @@ -217,22 +387,38 @@ - "pulsar://pulsar:6650" - "-g" - "bolt://neo4j:7687" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "text-completion": "command": - "text-completion-vertexai" - "-p" - "pulsar://pulsar:6650" - # - "-x" - # - "4096" - # - "-t" - # - "0.0" - "-k" - "/vertexai/private.json" - "-r" - "us-central1" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + - "-x" + - "4096" + - "-t" + - "0.0" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "./vertexai:/vertexai" @@ -241,19 +427,27 @@ - "text-completion-vertexai" - "-p" - "pulsar://pulsar:6650" - # - "-x" - # - "4096" - # - "-t" - # - "0.0" - "-k" - "/vertexai/private.json" - "-r" - "us-central1" + - "-x" + - "4096" + - "-t" + - "0.0" - "-i" - "non-persistent://tg/request/text-completion-rag" - "-o" - "non-persistent://tg/response/text-completion-rag-response" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "./vertexai:/vertexai" @@ -262,14 +456,22 @@ - "embeddings-vectorize" - "-p" - "pulsar://pulsar:6650" - "image": "docker.io/trustgraph/trustgraph-flow:0.6.9" + "deploy": + "resources": + "limits": + "cpus": "0.5" + "memory": "128M" + "reservations": + "cpus": "0.1" + "memory": "128M" + "image": "docker.io/trustgraph/trustgraph-flow:0.7.2" "restart": "on-failure:100" "volumes": - "neo4j": {} "etcd": {} "grafana-storage": {} "milvus": {} "minio-data": {} + "neo4j": {} "prometheus-data": {} "pulsar-conf": {} "pulsar-data": {} diff --git a/trustgraph/clients/base.py b/trustgraph/clients/base.py new file mode 100644 index 00000000..12b938f1 --- /dev/null +++ b/trustgraph/clients/base.py @@ -0,0 +1,121 @@ + +import pulsar +import _pulsar +from pulsar.schema import JsonSchema +import hashlib +import uuid +import time + +# Ugly +ERROR=_pulsar.LoggerLevel.Error +WARN=_pulsar.LoggerLevel.Warn +INFO=_pulsar.LoggerLevel.Info +DEBUG=_pulsar.LoggerLevel.Debug + +class BaseClient: + + def __init__( + self, log_level=ERROR, + subscriber=None, + input_queue=None, + output_queue=None, + input_schema=None, + output_schema=None, + pulsar_host="pulsar://pulsar:6650", + ): + + if input_queue == None: raise RuntimeError("Need input_queue") + if output_queue == None: raise RuntimeError("Need output_queue") + if input_schema == None: raise RuntimeError("Need input_schema") + if output_schema == None: raise RuntimeError("Need output_schema") + + if subscriber == None: + subscriber = str(uuid.uuid4()) + + self.client = pulsar.Client( + pulsar_host, + logger=pulsar.ConsoleLogger(log_level), + ) + + self.producer = self.client.create_producer( + topic=input_queue, + schema=JsonSchema(input_schema), + chunking_enabled=True, + ) + + self.consumer = self.client.subscribe( + output_queue, subscriber, + schema=JsonSchema(output_schema), + ) + + self.input_schema = input_schema + self.output_schema = output_schema + + def call(self, **args): + + timeout = args.get("timeout", 30) + + if "timeout" in args: + del args["timeout"] + + id = str(uuid.uuid4()) + + r = self.input_schema(**args) + + end_time = time.time() + timeout + + self.producer.send(r, properties={ "id": id }) + + while time.time() < end_time: + + try: + msg = self.consumer.receive(timeout_millis=5000) + except pulsar.exceptions.Timeout: + continue + + mid = msg.properties()["id"] + + if mid == id: + + value = msg.value() + + if value.error: + + self.consumer.acknowledge(msg) + + if value.error.type == "llm-error": + raise LlmError(value.error.message) + + elif value.error.type == "too-many-requests": + raise TooManyRequests(value.error.message) + + elif value.error.type == "ParseError": + raise ParseError(value.error.message) + + else: + + raise RuntimeError( + f"{value.error.type}: {value.error.message}" + ) + + resp = msg.value() + self.consumer.acknowledge(msg) + return resp + + # Ignore messages with wrong ID + self.consumer.acknowledge(msg) + + raise TimeoutError("Timed out waiting for response") + + def __del__(self): + + if hasattr(self, "consumer"): +# self.consumer.unsubscribe() + self.consumer.close() + + if hasattr(self, "producer"): + self.producer.flush() + self.producer.close() + + self.client.close() +