trustgraph/Makefile

46 lines
1 KiB
Makefile
Raw Normal View History

2024-07-10 23:20:06 +01:00
# VERSION=$(shell git describe | sed 's/^v//')
VERSION=0.6.9
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:
# 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 \
openai-neo4j storage
DCS=$(foreach template,${TEMPLATES},${template:%=docker-compose-%.yaml})
update-templates: set-version ${DCS}
docker-compose-%.yaml: templates/docker-compose-%.jsonnet templates/components/version.jsonnet
jsonnet -S ${@:docker-compose-%.yaml=templates/docker-compose-%.jsonnet} > $@