trustgraph/templates/components/embeddings-hf.jsonnet
cybermaggedon 65d7f6d261
Refactor templates (#52)
* Switching from docker compose to abstract form - should be easier to k8s later
* Text loader util
* Recreate templates
2024-09-05 16:40:47 +01:00

38 lines
964 B
Jsonnet

local base = import "base/base.jsonnet";
local images = import "values/images.jsonnet";
local url = import "values/url.jsonnet";
local prompts = import "prompts/mixtral.jsonnet";
{
"embeddings-model":: "all-MiniLM-L6-v2",
embeddings +: {
create:: function(engine)
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 ]
);
engine.resources([
containerSet,
])
},
}