mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-16 16:51:02 +02:00
Broadly working in k8s on GCP
This commit is contained in:
parent
614ffc0fd3
commit
8b48a12619
22 changed files with 221 additions and 21 deletions
|
|
@ -37,8 +37,13 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"text-completion", [ container ]
|
"text-completion", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -74,8 +79,13 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"text-completion-rag", [ container ]
|
"text-completion-rag", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,13 @@ local chunker = import "chunker-recursive.jsonnet";
|
||||||
"text-completion", [ container ]
|
"text-completion", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -85,8 +90,13 @@ local chunker = import "chunker-recursive.jsonnet";
|
||||||
"text-completion-rag", [ container ]
|
"text-completion-rag", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,13 @@ cassandra + {
|
||||||
"stop-triples", [ container ]
|
"stop-triples", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -54,8 +59,13 @@ cassandra + {
|
||||||
"query-triples", [ container ]
|
"query-triples", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,13 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"chunker", [ container ]
|
"chunker", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,13 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"text-completion", [ container ]
|
"text-completion", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -69,8 +74,13 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"text-completion-rag", [ container ]
|
"text-completion-rag", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,13 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"text-completion", [ container ]
|
"text-completion", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -68,8 +73,13 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"text-completion-rag", [ container ]
|
"text-completion-rag", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,13 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"document-rag", [ container ]
|
"document-rag", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -21,15 +21,20 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"-m",
|
"-m",
|
||||||
$["embeddings-model"],
|
$["embeddings-model"],
|
||||||
])
|
])
|
||||||
.with_limits("1.0", "256M")
|
.with_limits("1.0", "400M")
|
||||||
.with_reservations("0.5", "256M");
|
.with_reservations("0.5", "400M");
|
||||||
|
|
||||||
local containerSet = engine.containers(
|
local containerSet = engine.containers(
|
||||||
"embeddings", [ container ]
|
"embeddings", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,13 @@ local url = import "values/url.jsonnet";
|
||||||
"embeddings", [ container ]
|
"embeddings", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,13 @@ local url = import "values/url.jsonnet";
|
||||||
"kg-extract-definitions", [ container ]
|
"kg-extract-definitions", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -52,8 +57,13 @@ local url = import "values/url.jsonnet";
|
||||||
"kg-extract-relationships", [ container ]
|
"kg-extract-relationships", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -87,8 +97,13 @@ local url = import "values/url.jsonnet";
|
||||||
"graph-rag", [ container ]
|
"graph-rag", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,13 @@ milvus + {
|
||||||
"store-graph-embeddings", [ container ]
|
"store-graph-embeddings", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -54,8 +59,13 @@ milvus + {
|
||||||
"query-graph-embeddings", [ container ]
|
"query-graph-embeddings", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -81,8 +91,13 @@ milvus + {
|
||||||
"store-doc-embeddings", [ container ]
|
"store-doc-embeddings", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -108,8 +123,13 @@ milvus + {
|
||||||
"query-doc-embeddings", [ container ]
|
"query-doc-embeddings", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,13 @@ neo4j + {
|
||||||
"store-triples", [ container ]
|
"store-triples", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -55,8 +60,13 @@ neo4j + {
|
||||||
"query-triples", [ container ]
|
"query-triples", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,13 @@ local prompts = import "prompts/slm.jsonnet";
|
||||||
"text-completion", [ container ]
|
"text-completion", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -64,8 +69,13 @@ local prompts = import "prompts/slm.jsonnet";
|
||||||
"text-completion-rag", [ container ]
|
"text-completion-rag", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,13 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"text-completion", [ container ]
|
"text-completion", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -74,8 +79,13 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"text-completion-rag", [ container ]
|
"text-completion-rag", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,13 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"prompt", [ container ]
|
"prompt", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -61,8 +66,13 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"prompt-rag", [ container ]
|
"prompt-rag", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,13 @@ local default_prompts = import "prompts/default-prompts.jsonnet";
|
||||||
"prompt", [ container ]
|
"prompt", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -82,8 +87,13 @@ local default_prompts = import "prompts/default-prompts.jsonnet";
|
||||||
"prompt-rag", [ container ]
|
"prompt-rag", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@ local images = import "values/images.jsonnet";
|
||||||
.with_command(["bin/pulsar", "standalone"])
|
.with_command(["bin/pulsar", "standalone"])
|
||||||
// .with_command(["/bin/sh", "-c", "sleep 9999999"])
|
// .with_command(["/bin/sh", "-c", "sleep 9999999"])
|
||||||
.with_environment({
|
.with_environment({
|
||||||
"PULSAR_MEM": "-Xms700M -Xmx700M"
|
"PULSAR_MEM": "-Xms600M -Xmx600M"
|
||||||
})
|
})
|
||||||
.with_limits("1.0", "1500M")
|
.with_limits("2.0", "1500M")
|
||||||
.with_reservations("0.5", "1500M")
|
.with_reservations("1.0", "1500M")
|
||||||
// .with_volume_mount(confVolume, "/pulsar/conf")
|
// .with_volume_mount(confVolume, "/pulsar/conf")
|
||||||
.with_volume_mount(dataVolume, "/pulsar/data")
|
.with_volume_mount(dataVolume, "/pulsar/data")
|
||||||
.with_port(6650, 6650, "bookie")
|
.with_port(6650, 6650, "bookie")
|
||||||
|
|
@ -31,11 +31,10 @@ local images = import "values/images.jsonnet";
|
||||||
.with_command([
|
.with_command([
|
||||||
"sh",
|
"sh",
|
||||||
"-c",
|
"-c",
|
||||||
"sleep 1000000",
|
"while true; do pulsar-admin --admin-url http://pulsar:8080 tenants create tg ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request ; pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response ; pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response; sleep 20; done",
|
||||||
// "pulsar-admin --admin-url http://pulsar:8080 tenants create tg && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response && pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response",
|
|
||||||
])
|
])
|
||||||
.with_limits("2", "256M")
|
.with_limits("1", "400M")
|
||||||
.with_reservations("0.1", "256M");
|
.with_reservations("0.1", "400M");
|
||||||
|
|
||||||
local containerSet = engine.containers(
|
local containerSet = engine.containers(
|
||||||
"pulsar",
|
"pulsar",
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,13 @@ qdrant + {
|
||||||
"store-graph-embeddings", [ container ]
|
"store-graph-embeddings", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -54,8 +59,13 @@ qdrant + {
|
||||||
"query-graph-embeddings", [ container ]
|
"query-graph-embeddings", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -81,8 +91,13 @@ qdrant + {
|
||||||
"store-doc-embeddings", [ container ]
|
"store-doc-embeddings", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -108,8 +123,13 @@ qdrant + {
|
||||||
"query-doc-embeddings", [ container ]
|
"query-doc-embeddings", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8080, 8080, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,13 @@ local prompt = import "prompt-template.jsonnet";
|
||||||
"chunker", [ container ]
|
"chunker", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -56,8 +61,13 @@ local prompt = import "prompt-template.jsonnet";
|
||||||
"pdf-decoder", [ container ]
|
"pdf-decoder", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -81,8 +91,13 @@ local prompt = import "prompt-template.jsonnet";
|
||||||
"vectorize", [ container ]
|
"vectorize", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,14 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"text-completion", [ container ]
|
"text-completion", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
cfgVol,
|
cfgVol,
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -98,12 +103,16 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
"text-completion-rag", [ container ]
|
"text-completion-rag", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.internalService(containerSet)
|
||||||
|
.with_port(8000, 8000, "metrics");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
cfgVol,
|
cfgVol,
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} + prompts
|
} + prompts
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,13 @@ local sc = {
|
||||||
metadata: {
|
metadata: {
|
||||||
name: "tg",
|
name: "tg",
|
||||||
},
|
},
|
||||||
provisioner: "k8s.io/minikube-hostpath",
|
provisioner: "pd.csi.storage.gke.io",
|
||||||
|
parameters: {
|
||||||
|
type: "pd-balanced",
|
||||||
|
"csi.storage.k8s.io/fstype": "ext4",
|
||||||
|
},
|
||||||
reclaimPolicy: "Delete",
|
reclaimPolicy: "Delete",
|
||||||
volumeBindingMode: "Immediate",
|
volumeBindingMode: "WaitForFirstConsumer",
|
||||||
};
|
};
|
||||||
|
|
||||||
//patterns["pulsar"].create(engine)
|
//patterns["pulsar"].create(engine)
|
||||||
|
|
@ -46,5 +50,3 @@ local resourceList = {
|
||||||
|
|
||||||
resourceList
|
resourceList
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,9 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Just an alias
|
||||||
|
internalService:: self.service,
|
||||||
|
|
||||||
service:: function(containers)
|
service:: function(containers)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -167,7 +170,6 @@
|
||||||
namespace: "trustgraph",
|
namespace: "trustgraph",
|
||||||
},
|
},
|
||||||
spec: {
|
spec: {
|
||||||
// type: "NodePort",
|
|
||||||
selector: {
|
selector: {
|
||||||
app: service.name,
|
app: service.name,
|
||||||
},
|
},
|
||||||
|
|
@ -175,7 +177,6 @@
|
||||||
{
|
{
|
||||||
port: port.src,
|
port: port.src,
|
||||||
targetPort: port.dest,
|
targetPort: port.dest,
|
||||||
// nodePort: port.nodeport,
|
|
||||||
name: port.name,
|
name: port.name,
|
||||||
}
|
}
|
||||||
for port in service.ports
|
for port in service.ports
|
||||||
|
|
@ -196,7 +197,7 @@
|
||||||
with_size:: function(size) self + { size: size },
|
with_size:: function(size) self + { size: size },
|
||||||
|
|
||||||
add:: function() [
|
add:: function() [
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
|
|
||||||
apiVersion: "v1",
|
apiVersion: "v1",
|
||||||
|
|
@ -209,16 +210,15 @@
|
||||||
},
|
},
|
||||||
spec: {
|
spec: {
|
||||||
storageClassName: "tg",
|
storageClassName: "tg",
|
||||||
|
volumeMode: "Filesystem",
|
||||||
capacity: {
|
capacity: {
|
||||||
storage: volume.size,
|
storage: volume.size,
|
||||||
},
|
},
|
||||||
accessModes: [ "ReadWriteOnce" ],
|
accessModes: [ "ReadWriteOnce" ],
|
||||||
persistentVolumeReclaimPolicy: "Delete",
|
persistentVolumeReclaimPolicy: "Delete",
|
||||||
hostPath: {
|
|
||||||
path: "/data/k8s/" + volume.name,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
{
|
{
|
||||||
apiVersion: "v1",
|
apiVersion: "v1",
|
||||||
kind: "PersistentVolumeClaim",
|
kind: "PersistentVolumeClaim",
|
||||||
|
|
@ -234,7 +234,7 @@
|
||||||
storage: volume.size,
|
storage: volume.size,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
volumeName: volume.name,
|
// volumeName: volume.name,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue