mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-28 09:56:22 +02:00
Refactor templates (#52)
* Switching from docker compose to abstract form - should be easier to k8s later * Text loader util * Recreate templates
This commit is contained in:
parent
af5508ff68
commit
65d7f6d261
47 changed files with 1659 additions and 1277 deletions
|
|
@ -1,40 +1,38 @@
|
|||
local base = import "base/base.jsonnet";
|
||||
local images = import "values/images.jsonnet";
|
||||
local url = import "values/url.jsonnet";
|
||||
local prompts = import "prompt-template.jsonnet";
|
||||
local prompts = import "prompts/mixtral.jsonnet";
|
||||
|
||||
{
|
||||
|
||||
"embeddings-model":: "all-MiniLM-L6-v2",
|
||||
|
||||
services +: {
|
||||
embeddings +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
||||
embeddings: base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"embeddings-hf",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-m",
|
||||
$["embeddings-model"],
|
||||
],
|
||||
deploy: {
|
||||
resources: {
|
||||
limits: {
|
||||
cpus: '1.0',
|
||||
memory: '256M'
|
||||
},
|
||||
reservations: {
|
||||
cpus: '0.5',
|
||||
memory: '256M'
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
local container =
|
||||
engine.container("embeddings")
|
||||
.with_image(images.trustgraph)
|
||||
.with_command([
|
||||
"embeddings-hf",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-m",
|
||||
$["embeddings-model"],
|
||||
])
|
||||
.with_limits("1.0", "256M")
|
||||
.with_reservations("0.5", "256M");
|
||||
|
||||
}
|
||||
local containerSet = engine.containers(
|
||||
"embeddings", [ container ]
|
||||
);
|
||||
|
||||
} + prompts
|
||||
engine.resources([
|
||||
containerSet,
|
||||
])
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue