mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-17 03:15:14 +02:00
Fix remaining templates (#54)
This commit is contained in:
parent
6fb118ba95
commit
f7429f2f9b
7 changed files with 328 additions and 304 deletions
|
|
@ -1,41 +1,40 @@
|
|||
local base = import "base/base.jsonnet";
|
||||
local images = import "values/images.jsonnet";
|
||||
local url = import "values/url.jsonnet";
|
||||
local prompts = import "prompt-template.jsonnet";
|
||||
|
||||
{
|
||||
|
||||
"embeddings-model":: "mxbai-embed-large",
|
||||
"ollama-url":: "${OLLAMA_HOST}",
|
||||
|
||||
services +: {
|
||||
embeddings +: {
|
||||
|
||||
create:: function(engine)
|
||||
|
||||
embeddings: base + {
|
||||
image: images.trustgraph,
|
||||
command: [
|
||||
"embeddings-ollama",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-m",
|
||||
$["embeddings-model"],
|
||||
"-r",
|
||||
$["ollama-url"],
|
||||
],
|
||||
deploy: {
|
||||
resources: {
|
||||
limits: {
|
||||
cpus: '0.5',
|
||||
memory: '128M'
|
||||
},
|
||||
reservations: {
|
||||
cpus: '0.1',
|
||||
memory: '128M'
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
local container =
|
||||
engine.container("embeddings")
|
||||
.with_image(images.trustgraph)
|
||||
.with_command([
|
||||
"embeddings-ollama",
|
||||
"-p",
|
||||
url.pulsar,
|
||||
"-m",
|
||||
$["embeddings-model"],
|
||||
"-r",
|
||||
$["ollama-url"],
|
||||
])
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M");
|
||||
|
||||
}
|
||||
local containerSet = engine.containers(
|
||||
"embeddings", [ container ]
|
||||
);
|
||||
|
||||
} + prompts
|
||||
engine.resources([
|
||||
containerSet,
|
||||
])
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue