mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-06-09 06:45:13 +02:00
Feature/pkgsplit (#83)
* Starting to spawn base package * More package hacking * Bedrock and VertexAI * Parquet split * Updated templates * Utils
This commit is contained in:
parent
3fb75c617b
commit
9b91d5eee3
262 changed files with 630 additions and 420 deletions
54
Makefile
54
Makefile
|
|
@ -1,20 +1,31 @@
|
|||
|
||||
# VERSION=$(shell git describe | sed 's/^v//')
|
||||
VERSION=0.11.8
|
||||
VERSION=0.11.9
|
||||
|
||||
DOCKER=podman
|
||||
|
||||
all: container
|
||||
|
||||
pkgs:
|
||||
pip3 wheel --no-deps --wheel-dir dist trustgraph-core/
|
||||
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/
|
||||
pip3 wheel --no-deps --wheel-dir dist trustgraph-parquet/
|
||||
pip3 wheel --no-deps --wheel-dir dist trustgraph-embeddings-hf/
|
||||
pip3 wheel --no-deps --wheel-dir dist trustgraph-utils/
|
||||
|
||||
CONTAINER=docker.io/trustgraph/trustgraph-flow
|
||||
|
||||
update-package-versions:
|
||||
echo __version__ = \"${VERSION}\" > trustgraph-core/trustgraph/core_version.py
|
||||
mkdir -p trustgraph-utils/trustgraph
|
||||
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
|
||||
echo __version__ = \"${VERSION}\" > trustgraph-parquet/trustgraph/parquet_version.py
|
||||
echo __version__ = \"${VERSION}\" > trustgraph-embeddings-hf/trustgraph/embeddings_hf_version.py
|
||||
echo __version__ = \"${VERSION}\" > trustgraph-utils/trustgraph/utils_version.py
|
||||
|
||||
container: update-package-versions
|
||||
${DOCKER} build -f Containerfile -t ${CONTAINER}:${VERSION} \
|
||||
|
|
@ -23,17 +34,6 @@ container: update-package-versions
|
|||
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/
|
||||
|
||||
|
|
@ -61,10 +61,8 @@ JSONNET_FLAGS=-J templates -J .
|
|||
# is going away in 0.11.
|
||||
|
||||
update-templates: update-dcs
|
||||
# update-minikubes
|
||||
|
||||
JSON_TO_YAML=python3 -c 'import sys, yaml, json; j=json.loads(sys.stdin.read()); print(yaml.safe_dump(j))'
|
||||
# JSON_TO_YAML=cat
|
||||
|
||||
update-dcs: set-version
|
||||
for graph in ${GRAPHS}; do \
|
||||
|
|
@ -88,31 +86,7 @@ update-dcs: set-version
|
|||
done; \
|
||||
done
|
||||
|
||||
update-minikubes: set-version
|
||||
rm -rf deploy/minikube
|
||||
mkdir -p deploy/minikube
|
||||
for model in ${MODELS}; do \
|
||||
for graph in ${GRAPHS}; do \
|
||||
cm=$${graph},pulsar,${VECTORDB},embeddings-hf,graph-rag,grafana,trustgraph,$${model}; \
|
||||
input=templates/opts-to-minikube-k8s.jsonnet; \
|
||||
output=deploy/minikube/tg-launch-$${model}-$${graph}.yaml; \
|
||||
echo $${model} + $${graph} '->' $${output}; \
|
||||
jsonnet ${JSONNET_FLAGS} \
|
||||
--ext-str options=$${cm} $${input} | \
|
||||
${JSON_TO_YAML} > $${output}; \
|
||||
done; \
|
||||
done
|
||||
|
||||
docker-hub-login:
|
||||
cat docker-token.txt | \
|
||||
docker login -u trustgraph --password-stdin registry-1.docker.io
|
||||
|
||||
FORCE:
|
||||
|
||||
IGNOREconfig.yaml: config.json FORCE
|
||||
jsonnet -J . -J templates/ templates/config-to-gcp-k8s.jsonnet | \
|
||||
python3 -c 'import sys, yaml, json; j=json.loads(sys.stdin.read()); print(yaml.safe_dump(j))' > $@
|
||||
|
||||
config.yaml: config.json FORCE
|
||||
jsonnet -J . -J templates/ templates/config-to-minikube-k8s.jsonnet | \
|
||||
python3 -c 'import sys, yaml, json; j=json.loads(sys.stdin.read()); print(yaml.safe_dump(j))' > $@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue