trustgraph/Makefile
cybermaggedon fa0b89b5d4
Simplify templates (#10)
- Add component template files for all LLM types
- Top-level templates simplified to use just components
- Version to 0.6.2
2024-08-14 20:56:57 +01:00

43 lines
1 KiB
Makefile

# VERSION=$(shell git describe | sed 's/^v//')
VERSION=0.6.2
DOCKER=podman
all: container
CONTAINER=docker.io/trustgraph/trustgraph-flow
container:
${DOCKER} build -f Containerfile -t ${CONTAINER}:${VERSION} \
--format docker
push:
${DOCKER} push ${CONTAINER}:${VERSION}
start:
${DOCKER} run -i -t --name ${NAME} \
-i -t \
-p 8081:8081 \
-v $$(pwd)/keys:/keys \
-v $$(pwd)/configs:/configs \
${CONTAINER}:${VERSION}
stop:
${DOCKER} rm -f ${NAME}
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 openai-neo4j
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} > $@