trustgraph/Makefile

72 lines
1.7 KiB
Makefile
Raw Normal View History

2024-07-10 23:20:06 +01:00
# VERSION=$(shell git describe | sed 's/^v//')
VERSION=0.9.4
2024-07-10 23:20:06 +01:00
2024-08-12 17:39:54 +01:00
DOCKER=podman
2024-07-10 23:20:06 +01:00
all: container
CONTAINER=docker.io/trustgraph/trustgraph-flow
container:
2024-08-12 17:39:54 +01:00
${DOCKER} build -f Containerfile -t ${CONTAINER}:${VERSION} \
2024-07-10 23:20:06 +01:00
--format docker
push:
2024-08-12 17:39:54 +01:00
${DOCKER} push ${CONTAINER}:${VERSION}
2024-07-10 23:20:06 +01:00
start:
2024-08-12 17:39:54 +01:00
${DOCKER} run -i -t --name ${NAME} \
2024-07-10 23:20:06 +01:00
-i -t \
-p 8081:8081 \
-v $$(pwd)/keys:/keys \
-v $$(pwd)/configs:/configs \
${CONTAINER}:${VERSION}
stop:
2024-08-12 17:39:54 +01:00
${DOCKER} rm -f ${NAME}
2024-07-10 23:20:06 +01:00
clean:
rm -rf wheels/
2024-07-15 19:42:16 +01:00
set-version:
echo '"${VERSION}"' > templates/values/version.jsonnet
TEMPLATES=azure bedrock claude cohere mix ollama openai vertexai \
openai-neo4j storage
2024-08-22 00:19:55 +01:00
DCS=$(foreach template,${TEMPLATES},${template:%=tg-launch-%.yaml})
MODELS=azure bedrock claude cohere ollama openai vertexai
GRAPHS=cassandra neo4j
# tg-launch-%.yaml: templates/%.jsonnet templates/components/version.jsonnet
# jsonnet -Jtemplates \
# -S ${@:tg-launch-%.yaml=templates/%.jsonnet} > $@
# VECTORDB=milvus
VECTORDB=qdrant
JSONNET_FLAGS=-J templates -J .
update-templates: set-version
for graph in ${GRAPHS}; do \
cm=$${graph},pulsar,${VECTORDB},grafana; \
input=templates/main.jsonnet; \
output=tg-storage-$${graph}.yaml; \
echo $${graph} '->' $${output}; \
jsonnet ${JSONNET_FLAGS} \
--ext-str options=$${cm} -S $${input} > $${output}; \
done
for model in ${MODELS}; do \
for graph in ${GRAPHS}; do \
cm=$${graph},pulsar,${VECTORDB},embeddings-hf,graph-rag,grafana,trustgraph,$${model}; \
input=templates/main.jsonnet; \
output=tg-launch-$${model}-$${graph}.yaml; \
echo $${model} + $${graph} '->' $${output}; \
jsonnet ${JSONNET_FLAGS} \
--ext-str options=$${cm} -S $${input} > $${output}; \
done; \
done