2024-07-10 23:20:06 +01:00
|
|
|
|
|
|
|
|
# VERSION=$(shell git describe | sed 's/^v//')
|
2024-10-04 17:28:07 +01:00
|
|
|
|
2024-10-15 00:31:08 +01:00
|
|
|
VERSION=0.0.0
|
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
|
|
|
|
|
|
2024-09-30 20:50:20 +01:00
|
|
|
# Not used
|
|
|
|
|
wheels:
|
2024-10-04 22:12:39 +01:00
|
|
|
pip3 wheel --no-deps --wheel-dir dist trustgraph/
|
2024-09-30 19:36:09 +01:00
|
|
|
pip3 wheel --no-deps --wheel-dir dist trustgraph-base/
|
|
|
|
|
pip3 wheel --no-deps --wheel-dir dist trustgraph-flow/
|
|
|
|
|
pip3 wheel --no-deps --wheel-dir dist trustgraph-vertexai/
|
|
|
|
|
pip3 wheel --no-deps --wheel-dir dist trustgraph-bedrock/
|
2024-09-30 14:00:29 +01:00
|
|
|
pip3 wheel --no-deps --wheel-dir dist trustgraph-embeddings-hf/
|
2024-09-30 22:20:26 +01:00
|
|
|
pip3 wheel --no-deps --wheel-dir dist trustgraph-cli/
|
2025-03-20 09:29:40 +00:00
|
|
|
pip3 wheel --no-deps --wheel-dir dist trustgraph-ocr/
|
2024-09-30 14:00:29 +01:00
|
|
|
|
2024-10-04 15:47:46 +01:00
|
|
|
packages: update-package-versions
|
2024-09-30 20:50:20 +01:00
|
|
|
rm -rf dist/
|
2024-10-04 22:12:39 +01:00
|
|
|
cd trustgraph && python3 setup.py sdist --dist-dir ../dist/
|
2024-09-30 20:50:20 +01:00
|
|
|
cd trustgraph-base && python3 setup.py sdist --dist-dir ../dist/
|
|
|
|
|
cd trustgraph-flow && python3 setup.py sdist --dist-dir ../dist/
|
|
|
|
|
cd trustgraph-vertexai && python3 setup.py sdist --dist-dir ../dist/
|
|
|
|
|
cd trustgraph-bedrock && python3 setup.py sdist --dist-dir ../dist/
|
|
|
|
|
cd trustgraph-embeddings-hf && python3 setup.py sdist --dist-dir ../dist/
|
2024-09-30 22:20:26 +01:00
|
|
|
cd trustgraph-cli && python3 setup.py sdist --dist-dir ../dist/
|
2025-03-20 09:29:40 +00:00
|
|
|
cd trustgraph-ocr && python3 setup.py sdist --dist-dir ../dist/
|
2024-09-30 20:50:20 +01:00
|
|
|
|
2024-09-30 21:07:18 +01:00
|
|
|
pypi-upload:
|
|
|
|
|
twine upload dist/*-${VERSION}.*
|
|
|
|
|
|
2025-01-28 19:36:05 +00:00
|
|
|
CONTAINER_BASE=docker.io/trustgraph
|
2024-07-10 23:20:06 +01:00
|
|
|
|
2024-09-30 16:38:50 +01:00
|
|
|
update-package-versions:
|
2024-09-30 22:20:26 +01:00
|
|
|
mkdir -p trustgraph-cli/trustgraph
|
2024-10-08 20:33:14 +01:00
|
|
|
mkdir -p trustgraph/trustgraph
|
2024-09-30 19:36:09 +01:00
|
|
|
echo __version__ = \"${VERSION}\" > trustgraph-base/trustgraph/base_version.py
|
|
|
|
|
echo __version__ = \"${VERSION}\" > trustgraph-flow/trustgraph/flow_version.py
|
|
|
|
|
echo __version__ = \"${VERSION}\" > trustgraph-vertexai/trustgraph/vertexai_version.py
|
|
|
|
|
echo __version__ = \"${VERSION}\" > trustgraph-bedrock/trustgraph/bedrock_version.py
|
2024-09-30 16:38:50 +01:00
|
|
|
echo __version__ = \"${VERSION}\" > trustgraph-embeddings-hf/trustgraph/embeddings_hf_version.py
|
2024-09-30 22:20:26 +01:00
|
|
|
echo __version__ = \"${VERSION}\" > trustgraph-cli/trustgraph/cli_version.py
|
2025-03-20 09:29:40 +00:00
|
|
|
echo __version__ = \"${VERSION}\" > trustgraph-ocr/trustgraph/ocr_version.py
|
2024-10-04 22:12:39 +01:00
|
|
|
echo __version__ = \"${VERSION}\" > trustgraph/trustgraph/trustgraph_version.py
|
2024-09-30 16:38:50 +01:00
|
|
|
|
|
|
|
|
container: update-package-versions
|
2025-01-28 19:36:05 +00:00
|
|
|
${DOCKER} build -f containers/Containerfile.base \
|
|
|
|
|
-t ${CONTAINER_BASE}/trustgraph-base:${VERSION} .
|
|
|
|
|
${DOCKER} build -f containers/Containerfile.flow \
|
|
|
|
|
-t ${CONTAINER_BASE}/trustgraph-flow:${VERSION} .
|
|
|
|
|
${DOCKER} build -f containers/Containerfile.bedrock \
|
|
|
|
|
-t ${CONTAINER_BASE}/trustgraph-bedrock:${VERSION} .
|
|
|
|
|
${DOCKER} build -f containers/Containerfile.vertexai \
|
|
|
|
|
-t ${CONTAINER_BASE}/trustgraph-vertexai:${VERSION} .
|
|
|
|
|
${DOCKER} build -f containers/Containerfile.hf \
|
|
|
|
|
-t ${CONTAINER_BASE}/trustgraph-hf:${VERSION} .
|
2025-03-20 09:29:40 +00:00
|
|
|
${DOCKER} build -f containers/Containerfile.ocr \
|
|
|
|
|
-t ${CONTAINER_BASE}/trustgraph-ocr:${VERSION} .
|
|
|
|
|
|
2025-04-22 20:21:38 +01:00
|
|
|
some-containers:
|
|
|
|
|
${DOCKER} build -f containers/Containerfile.base \
|
|
|
|
|
-t ${CONTAINER_BASE}/trustgraph-base:${VERSION} .
|
|
|
|
|
${DOCKER} build -f containers/Containerfile.flow \
|
|
|
|
|
-t ${CONTAINER_BASE}/trustgraph-flow:${VERSION} .
|
2025-05-07 12:58:32 +01:00
|
|
|
# ${DOCKER} build -f containers/Containerfile.vertexai \
|
|
|
|
|
# -t ${CONTAINER_BASE}/trustgraph-vertexai:${VERSION} .
|
|
|
|
|
# ${DOCKER} build -f containers/Containerfile.bedrock \
|
|
|
|
|
# -t ${CONTAINER_BASE}/trustgraph-bedrock:${VERSION} .
|
2025-04-22 20:21:38 +01:00
|
|
|
|
2025-04-02 13:52:33 +01:00
|
|
|
basic-containers: update-package-versions
|
|
|
|
|
${DOCKER} build -f containers/Containerfile.base \
|
|
|
|
|
-t ${CONTAINER_BASE}/trustgraph-base:${VERSION} .
|
|
|
|
|
${DOCKER} build -f containers/Containerfile.flow \
|
|
|
|
|
-t ${CONTAINER_BASE}/trustgraph-flow:${VERSION} .
|
|
|
|
|
|
2025-03-20 09:29:40 +00:00
|
|
|
container.ocr:
|
|
|
|
|
${DOCKER} build -f containers/Containerfile.ocr \
|
|
|
|
|
-t ${CONTAINER_BASE}/trustgraph-ocr:${VERSION} .
|
2024-07-10 23:20:06 +01:00
|
|
|
|
|
|
|
|
push:
|
2025-01-28 19:36:05 +00:00
|
|
|
${DOCKER} push ${CONTAINER_BASE}/trustgraph-base:${VERSION}
|
|
|
|
|
${DOCKER} push ${CONTAINER_BASE}/trustgraph-flow:${VERSION}
|
|
|
|
|
${DOCKER} push ${CONTAINER_BASE}/trustgraph-bedrock:${VERSION}
|
|
|
|
|
${DOCKER} push ${CONTAINER_BASE}/trustgraph-vertexai:${VERSION}
|
|
|
|
|
${DOCKER} push ${CONTAINER_BASE}/trustgraph-hf:${VERSION}
|
2025-03-20 09:29:40 +00:00
|
|
|
${DOCKER} push ${CONTAINER_BASE}/trustgraph-ocr:${VERSION}
|
2024-07-10 23:20:06 +01:00
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
rm -rf wheels/
|
|
|
|
|
|
2024-07-15 19:42:16 +01:00
|
|
|
set-version:
|
2024-08-30 17:47:35 +01:00
|
|
|
echo '"${VERSION}"' > templates/values/version.jsonnet
|
2024-08-13 17:30:59 +01:00
|
|
|
|
2025-03-14 17:47:59 -07:00
|
|
|
TEMPLATES=azure bedrock claude cohere mix llamafile mistral ollama openai vertexai \
|
2024-08-21 16:20:21 +01:00
|
|
|
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
|
|
|
|
2025-03-14 17:47:59 -07:00
|
|
|
MODELS=azure bedrock claude cohere llamafile mistral ollama openai vertexai
|
|
|
|
|
GRAPHS=cassandra neo4j falkordb memgraph
|
2024-08-13 17:30:59 +01:00
|
|
|
|
2024-08-30 17:47:35 +01:00
|
|
|
# tg-launch-%.yaml: templates/%.jsonnet templates/components/version.jsonnet
|
|
|
|
|
# jsonnet -Jtemplates \
|
|
|
|
|
# -S ${@:tg-launch-%.yaml=templates/%.jsonnet} > $@
|
2024-08-13 17:30:59 +01:00
|
|
|
|
2024-08-27 23:37:24 +01:00
|
|
|
# VECTORDB=milvus
|
|
|
|
|
VECTORDB=qdrant
|
|
|
|
|
|
2024-08-30 17:47:35 +01:00
|
|
|
JSONNET_FLAGS=-J templates -J .
|
|
|
|
|
|
2024-09-29 18:13:34 +01:00
|
|
|
# Temporarily going back to how templates were built in 0.9 because this
|
|
|
|
|
# is going away in 0.11.
|
2024-09-05 16:40:47 +01:00
|
|
|
|
2024-09-29 18:13:34 +01:00
|
|
|
update-templates: update-dcs
|
2024-09-09 17:16:50 +01:00
|
|
|
|
|
|
|
|
JSON_TO_YAML=python3 -c 'import sys, yaml, json; j=json.loads(sys.stdin.read()); print(yaml.safe_dump(j))'
|
|
|
|
|
|
|
|
|
|
update-dcs: set-version
|
2024-08-25 23:57:30 +01:00
|
|
|
for graph in ${GRAPHS}; do \
|
2024-08-27 23:37:24 +01:00
|
|
|
cm=$${graph},pulsar,${VECTORDB},grafana; \
|
2024-09-09 17:16:50 +01:00
|
|
|
input=templates/opts-to-docker-compose.jsonnet; \
|
2024-09-29 18:13:34 +01:00
|
|
|
output=tg-storage-$${graph}.yaml; \
|
2024-08-25 23:57:30 +01:00
|
|
|
echo $${graph} '->' $${output}; \
|
2024-08-30 17:47:35 +01:00
|
|
|
jsonnet ${JSONNET_FLAGS} \
|
2024-09-09 17:16:50 +01:00
|
|
|
--ext-str options=$${cm} $${input} | \
|
|
|
|
|
${JSON_TO_YAML} > $${output}; \
|
2024-08-25 23:57:30 +01:00
|
|
|
done
|
2024-08-22 21:20:17 +01:00
|
|
|
for model in ${MODELS}; do \
|
|
|
|
|
for graph in ${GRAPHS}; do \
|
2024-09-03 00:09:15 +01:00
|
|
|
cm=$${graph},pulsar,${VECTORDB},embeddings-hf,graph-rag,grafana,trustgraph,$${model}; \
|
2024-09-09 17:16:50 +01:00
|
|
|
input=templates/opts-to-docker-compose.jsonnet; \
|
2024-09-29 18:13:34 +01:00
|
|
|
output=tg-launch-$${model}-$${graph}.yaml; \
|
2024-08-22 21:20:17 +01:00
|
|
|
echo $${model} + $${graph} '->' $${output}; \
|
2024-08-30 17:47:35 +01:00
|
|
|
jsonnet ${JSONNET_FLAGS} \
|
2024-09-09 17:16:50 +01:00
|
|
|
--ext-str options=$${cm} $${input} | \
|
|
|
|
|
${JSON_TO_YAML} > $${output}; \
|
2024-08-22 21:20:17 +01:00
|
|
|
done; \
|
|
|
|
|
done
|
2024-09-07 18:59:38 +01:00
|
|
|
|
2024-09-28 11:55:30 +01:00
|
|
|
docker-hub-login:
|
|
|
|
|
cat docker-token.txt | \
|
2025-01-06 21:45:42 +00:00
|
|
|
${DOCKER} login -u trustgraph --password-stdin registry-1.docker.io
|
2024-09-28 11:55:30 +01:00
|
|
|
|