Fix remaining templates (#54)

This commit is contained in:
cybermaggedon 2024-09-05 18:17:47 +01:00 committed by GitHub
parent 6fb118ba95
commit f7429f2f9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 328 additions and 304 deletions

View file

@ -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,
])
},
}