2024-07-10 23:20:06 +01:00
|
|
|
|
|
|
|
|
# VERSION=$(shell git describe | sed 's/^v//')
|
2024-08-27 21:55:12 +01:00
|
|
|
VERSION=0.7.19
|
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:
|
2024-08-14 09:06:33 +01:00
|
|
|
echo '"${VERSION}"' > templates/components/version.jsonnet
|
2024-08-13 17:30:59 +01:00
|
|
|
|
2024-08-21 16:20:21 +01:00
|
|
|
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})
|
2024-08-13 17:30:59 +01:00
|
|
|
|
2024-08-22 21:20:17 +01:00
|
|
|
MODELS=azure bedrock claude cohere ollama openai vertexai
|
|
|
|
|
GRAPHS=cassandra neo4j
|
2024-08-13 17:30:59 +01:00
|
|
|
|
2024-08-22 00:19:55 +01:00
|
|
|
tg-launch-%.yaml: templates/%.jsonnet templates/components/version.jsonnet
|
|
|
|
|
jsonnet -S ${@:tg-launch-%.yaml=templates/%.jsonnet} > $@
|
2024-08-13 17:30:59 +01:00
|
|
|
|
2024-08-22 21:20:17 +01:00
|
|
|
update-templates: set-version
|
2024-08-25 23:57:30 +01:00
|
|
|
for graph in ${GRAPHS}; do \
|
|
|
|
|
cm=$${graph},pulsar,milvus,grafana; \
|
|
|
|
|
input=templates/main.jsonnet; \
|
|
|
|
|
output=tg-storage-$${graph}.yaml; \
|
|
|
|
|
echo $${graph} '->' $${output}; \
|
|
|
|
|
jsonnet --ext-str options=$${cm} -S $${input} > $${output}; \
|
|
|
|
|
done
|
2024-08-22 21:20:17 +01:00
|
|
|
for model in ${MODELS}; do \
|
|
|
|
|
for graph in ${GRAPHS}; do \
|
2024-08-22 22:02:57 +01:00
|
|
|
cm=$${graph},pulsar,milvus,grafana,trustgraph,$${model}; \
|
2024-08-22 21:20:17 +01:00
|
|
|
input=templates/main.jsonnet; \
|
|
|
|
|
output=tg-launch-$${model}-$${graph}.yaml; \
|
|
|
|
|
echo $${model} + $${graph} '->' $${output}; \
|
|
|
|
|
jsonnet --ext-str options=$${cm} -S $${input} > $${output}; \
|
|
|
|
|
done; \
|
|
|
|
|
done
|