2024-09-03 00:09:15 +01:00
|
|
|
local base = import "base/base.jsonnet";
|
|
|
|
|
local images = import "values/images.jsonnet";
|
|
|
|
|
local url = import "values/url.jsonnet";
|
2024-09-05 16:40:47 +01:00
|
|
|
local prompts = import "prompts/mixtral.jsonnet";
|
2024-09-03 00:09:15 +01:00
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
"embeddings-model":: "all-MiniLM-L6-v2",
|
|
|
|
|
|
2024-09-05 16:40:47 +01:00
|
|
|
embeddings +: {
|
|
|
|
|
|
|
|
|
|
create:: function(engine)
|
|
|
|
|
|
|
|
|
|
local container =
|
|
|
|
|
engine.container("embeddings")
|
2025-01-28 19:36:05 +00:00
|
|
|
.with_image(images.trustgraph_hf)
|
2024-09-05 16:40:47 +01:00
|
|
|
.with_command([
|
|
|
|
|
"embeddings-hf",
|
|
|
|
|
"-p",
|
|
|
|
|
url.pulsar,
|
|
|
|
|
"-m",
|
|
|
|
|
$["embeddings-model"],
|
|
|
|
|
])
|
2024-09-07 18:59:38 +01:00
|
|
|
.with_limits("1.0", "400M")
|
|
|
|
|
.with_reservations("0.5", "400M");
|
2024-09-05 16:40:47 +01:00
|
|
|
|
|
|
|
|
local containerSet = engine.containers(
|
|
|
|
|
"embeddings", [ container ]
|
|
|
|
|
);
|
|
|
|
|
|
2024-09-07 18:59:38 +01:00
|
|
|
local service =
|
|
|
|
|
engine.internalService(containerSet)
|
|
|
|
|
.with_port(8000, 8000, "metrics");
|
|
|
|
|
|
2024-09-05 16:40:47 +01:00
|
|
|
engine.resources([
|
|
|
|
|
containerSet,
|
2024-09-07 18:59:38 +01:00
|
|
|
service,
|
2024-09-05 16:40:47 +01:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
2024-09-03 00:09:15 +01:00
|
|
|
|