mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-07 12:22:11 +02:00
Fix remaining templates (#54)
This commit is contained in:
parent
6fb118ba95
commit
f7429f2f9b
7 changed files with 328 additions and 304 deletions
|
|
@ -10,7 +10,7 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
create:: function(engine)
|
create:: function(engine)
|
||||||
|
|
||||||
local container =
|
local container =
|
||||||
engine.container("document-rag"")
|
engine.container("document-rag")
|
||||||
.with_image(images.trustgraph)
|
.with_image(images.trustgraph)
|
||||||
.with_command([
|
.with_command([
|
||||||
"document-rag",
|
"document-rag",
|
||||||
|
|
@ -25,7 +25,7 @@ local prompts = import "prompts/mixtral.jsonnet";
|
||||||
.with_reservations("0.1", "128M");
|
.with_reservations("0.1", "128M");
|
||||||
|
|
||||||
local containerSet = engine.containers(
|
local containerSet = engine.containers(
|
||||||
"document-rag"", [ container ]
|
"document-rag", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,40 @@
|
||||||
local base = import "base/base.jsonnet";
|
local base = import "base/base.jsonnet";
|
||||||
local images = import "values/images.jsonnet";
|
local images = import "values/images.jsonnet";
|
||||||
local url = import "values/url.jsonnet";
|
local url = import "values/url.jsonnet";
|
||||||
local prompts = import "prompt-template.jsonnet";
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
"embeddings-model":: "mxbai-embed-large",
|
"embeddings-model":: "mxbai-embed-large",
|
||||||
"ollama-url":: "${OLLAMA_HOST}",
|
"ollama-url":: "${OLLAMA_HOST}",
|
||||||
|
|
||||||
services +: {
|
embeddings +: {
|
||||||
|
|
||||||
|
create:: function(engine)
|
||||||
|
|
||||||
embeddings: base + {
|
local container =
|
||||||
image: images.trustgraph,
|
engine.container("embeddings")
|
||||||
command: [
|
.with_image(images.trustgraph)
|
||||||
"embeddings-ollama",
|
.with_command([
|
||||||
"-p",
|
"embeddings-ollama",
|
||||||
url.pulsar,
|
"-p",
|
||||||
"-m",
|
url.pulsar,
|
||||||
$["embeddings-model"],
|
"-m",
|
||||||
"-r",
|
$["embeddings-model"],
|
||||||
$["ollama-url"],
|
"-r",
|
||||||
],
|
$["ollama-url"],
|
||||||
deploy: {
|
])
|
||||||
resources: {
|
.with_limits("0.5", "128M")
|
||||||
limits: {
|
.with_reservations("0.1", "128M");
|
||||||
cpus: '0.5',
|
|
||||||
memory: '128M'
|
|
||||||
},
|
|
||||||
reservations: {
|
|
||||||
cpus: '0.1',
|
|
||||||
memory: '128M'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
local containerSet = engine.containers(
|
||||||
|
"embeddings", [ container ]
|
||||||
|
);
|
||||||
|
|
||||||
} + prompts
|
engine.resources([
|
||||||
|
containerSet,
|
||||||
|
])
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,104 +1,117 @@
|
||||||
local base = import "base/base.jsonnet";
|
local base = import "base/base.jsonnet";
|
||||||
local images = import "values/images.jsonnet";
|
local images = import "values/images.jsonnet";
|
||||||
local url = import "values/url.jsonnet";
|
local url = import "values/url.jsonnet";
|
||||||
|
local cassandra_hosts = "cassandra";
|
||||||
local milvus = import "stores/milvus.jsonnet";
|
local milvus = import "stores/milvus.jsonnet";
|
||||||
|
|
||||||
milvus + {
|
milvus + {
|
||||||
|
|
||||||
services +: {
|
"store-graph-embeddings" +: {
|
||||||
|
|
||||||
|
create:: function(engine)
|
||||||
|
|
||||||
"store-graph-embeddings": base + {
|
local container =
|
||||||
image: images.trustgraph,
|
engine.container("store-graph-embeddings")
|
||||||
command: [
|
.with_image(images.trustgraph)
|
||||||
"ge-write-milvus",
|
.with_command([
|
||||||
"-p",
|
"ge-write-milvus",
|
||||||
url.pulsar,
|
"-p",
|
||||||
"-t",
|
url.pulsar,
|
||||||
url.milvus,
|
"-t",
|
||||||
],
|
url.milvus,
|
||||||
deploy: {
|
])
|
||||||
resources: {
|
.with_limits("0.5", "128M")
|
||||||
limits: {
|
.with_reservations("0.1", "128M");
|
||||||
cpus: '0.5',
|
|
||||||
memory: '128M'
|
|
||||||
},
|
|
||||||
reservations: {
|
|
||||||
cpus: '0.1',
|
|
||||||
memory: '128M'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
"query-graph-embeddings": base + {
|
local containerSet = engine.containers(
|
||||||
image: images.trustgraph,
|
"store-graph-embeddings", [ container ]
|
||||||
command: [
|
);
|
||||||
"ge-query-milvus",
|
|
||||||
"-p",
|
|
||||||
url.pulsar,
|
|
||||||
"-t",
|
|
||||||
url.milvus,
|
|
||||||
],
|
|
||||||
deploy: {
|
|
||||||
resources: {
|
|
||||||
limits: {
|
|
||||||
cpus: '0.5',
|
|
||||||
memory: '128M'
|
|
||||||
},
|
|
||||||
reservations: {
|
|
||||||
cpus: '0.1',
|
|
||||||
memory: '128M'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
// Document embeddings writer & query service.
|
engine.resources([
|
||||||
"store-doc-embeddings": base + {
|
containerSet,
|
||||||
image: images.trustgraph,
|
])
|
||||||
command: [
|
|
||||||
"de-write-milvus",
|
},
|
||||||
"-p",
|
|
||||||
url.pulsar,
|
"query-graph-embeddings" +: {
|
||||||
"-t",
|
|
||||||
url.milvus,
|
create:: function(engine)
|
||||||
],
|
|
||||||
deploy: {
|
local container =
|
||||||
resources: {
|
engine.container("query-graph-embeddings")
|
||||||
limits: {
|
.with_image(images.trustgraph)
|
||||||
cpus: '0.5',
|
.with_command([
|
||||||
memory: '128M'
|
"ge-query-milvus",
|
||||||
},
|
"-p",
|
||||||
reservations: {
|
url.pulsar,
|
||||||
cpus: '0.1',
|
"-t",
|
||||||
memory: '128M'
|
url.milvus,
|
||||||
}
|
])
|
||||||
}
|
.with_limits("0.5", "128M")
|
||||||
},
|
.with_reservations("0.1", "128M");
|
||||||
},
|
|
||||||
|
local containerSet = engine.containers(
|
||||||
|
"query-graph-embeddings", [ container ]
|
||||||
|
);
|
||||||
|
|
||||||
|
engine.resources([
|
||||||
|
containerSet,
|
||||||
|
])
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
"store-doc-embeddings" +: {
|
||||||
|
|
||||||
|
create:: function(engine)
|
||||||
|
|
||||||
|
local container =
|
||||||
|
engine.container("store-doc-embeddings")
|
||||||
|
.with_image(images.trustgraph)
|
||||||
|
.with_command([
|
||||||
|
"de-write-milvus",
|
||||||
|
"-p",
|
||||||
|
url.pulsar,
|
||||||
|
"-t",
|
||||||
|
url.milvus,
|
||||||
|
])
|
||||||
|
.with_limits("0.5", "128M")
|
||||||
|
.with_reservations("0.1", "128M");
|
||||||
|
|
||||||
|
local containerSet = engine.containers(
|
||||||
|
"store-doc-embeddings", [ container ]
|
||||||
|
);
|
||||||
|
|
||||||
|
engine.resources([
|
||||||
|
containerSet,
|
||||||
|
])
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
"query-doc-embeddings" +: {
|
||||||
|
|
||||||
|
create:: function(engine)
|
||||||
|
|
||||||
|
local container =
|
||||||
|
engine.container("query-doc-embeddings")
|
||||||
|
.with_image(images.trustgraph)
|
||||||
|
.with_command([
|
||||||
|
"de-query-milvus",
|
||||||
|
"-p",
|
||||||
|
url.pulsar,
|
||||||
|
"-t",
|
||||||
|
url.milvus,
|
||||||
|
])
|
||||||
|
.with_limits("0.5", "128M")
|
||||||
|
.with_reservations("0.1", "128M");
|
||||||
|
|
||||||
|
local containerSet = engine.containers(
|
||||||
|
"query-doc-embeddings", [ container ]
|
||||||
|
);
|
||||||
|
|
||||||
|
engine.resources([
|
||||||
|
containerSet,
|
||||||
|
])
|
||||||
|
|
||||||
"query-doc-embeddings": base + {
|
|
||||||
image: images.trustgraph,
|
|
||||||
command: [
|
|
||||||
"de-query-milvus",
|
|
||||||
"-p",
|
|
||||||
url.pulsar,
|
|
||||||
"-t",
|
|
||||||
url.milvus,
|
|
||||||
],
|
|
||||||
deploy: {
|
|
||||||
resources: {
|
|
||||||
limits: {
|
|
||||||
cpus: '0.5',
|
|
||||||
memory: '128M'
|
|
||||||
},
|
|
||||||
reservations: {
|
|
||||||
cpus: '0.1',
|
|
||||||
memory: '128M'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,41 @@
|
||||||
local base = import "base/base.jsonnet";
|
local base = import "base/base.jsonnet";
|
||||||
local images = import "values/images.jsonnet";
|
local images = import "values/images.jsonnet";
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
// FIXME: Should persist *something*
|
"pulsar" +: {
|
||||||
volumes +: {
|
|
||||||
},
|
create:: function(engine)
|
||||||
|
|
||||||
|
// FIXME: Should persist something?
|
||||||
|
// local volume = engine.volume(...)
|
||||||
|
|
||||||
|
local container =
|
||||||
|
engine.container("pulsar")
|
||||||
|
.with_image(images.pulsar_manager)
|
||||||
|
.with_environment({
|
||||||
|
SPRING_CONFIGURATION_FILE: "/pulsar-manager/pulsar-manager/application.properties",
|
||||||
|
})
|
||||||
|
.with_limits("0.5", "1.4G")
|
||||||
|
.with_reservations("0.1", "1.4G")
|
||||||
|
.with_port(9527, 9527, "api")
|
||||||
|
.with_port(7750, 7750, "api2");
|
||||||
|
|
||||||
|
local containerSet = engine.containers(
|
||||||
|
"pulsar", [ container ]
|
||||||
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.service(containerSet)
|
||||||
|
.with_port(9527, 9527)
|
||||||
|
.with_port(7750, 7750);
|
||||||
|
|
||||||
|
engine.resources([
|
||||||
|
containerSet,
|
||||||
|
service,
|
||||||
|
])
|
||||||
|
|
||||||
services +: {
|
|
||||||
"pulsar-manager": base + {
|
|
||||||
image: images.pulsar_manager,
|
|
||||||
ports: [
|
|
||||||
"9527:9527",
|
|
||||||
"7750:7750",
|
|
||||||
],
|
|
||||||
environment: {
|
|
||||||
SPRING_CONFIGURATION_FILE: "/pulsar-manager/pulsar-manager/application.properties",
|
|
||||||
},
|
|
||||||
deploy: {
|
|
||||||
resources: {
|
|
||||||
limits: {
|
|
||||||
cpus: '0.5',
|
|
||||||
memory: '1.4G'
|
|
||||||
},
|
|
||||||
reservations: {
|
|
||||||
cpus: '0.1',
|
|
||||||
memory: '1.4G'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,52 +7,52 @@ local images = import "values/images.jsonnet";
|
||||||
|
|
||||||
create:: function(engine)
|
create:: function(engine)
|
||||||
|
|
||||||
local confVolume = engine.volume("pulsar-conf").with_size("2G");
|
local confVolume = engine.volume("pulsar-conf").with_size("2G");
|
||||||
local dataVolume = engine.volume("pulsar-data").with_size("20G");
|
local dataVolume = engine.volume("pulsar-data").with_size("20G");
|
||||||
|
|
||||||
local container =
|
local container =
|
||||||
engine.container("pulsar")
|
engine.container("pulsar")
|
||||||
.with_image(images.pulsar)
|
.with_image(images.pulsar)
|
||||||
.with_command("bin/pulsar standalone")
|
.with_command("bin/pulsar standalone")
|
||||||
.with_environment({
|
.with_environment({
|
||||||
"PULSAR_MEM": "-Xms700M -Xmx700M"
|
"PULSAR_MEM": "-Xms700M -Xmx700M"
|
||||||
})
|
})
|
||||||
.with_limits("1.0", "900M")
|
.with_limits("1.0", "900M")
|
||||||
.with_reservations("0.5", "900M")
|
.with_reservations("0.5", "900M")
|
||||||
.with_volume_mount(confVolume, "/pulsar/conf")
|
.with_volume_mount(confVolume, "/pulsar/conf")
|
||||||
.with_volume_mount(dataVolume, "/pulsar/data")
|
.with_volume_mount(dataVolume, "/pulsar/data")
|
||||||
.with_port(6650, 6650, "bookie")
|
.with_port(6650, 6650, "bookie")
|
||||||
.with_port(8080, 8080, "http");
|
.with_port(8080, 8080, "http");
|
||||||
|
|
||||||
local adminContainer =
|
local adminContainer =
|
||||||
engine.container("init-pulsar")
|
engine.container("init-pulsar")
|
||||||
.with_image(images.pulsar)
|
.with_image(images.pulsar)
|
||||||
.with_command([
|
.with_command([
|
||||||
"sh",
|
"sh",
|
||||||
"-c",
|
"-c",
|
||||||
"pulsar-admin --admin-url http://pulsar:8080 tenants create tg && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response && pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response",
|
"pulsar-admin --admin-url http://pulsar:8080 tenants create tg && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response && pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response",
|
||||||
])
|
])
|
||||||
.with_limits("0.5", "128M")
|
.with_limits("0.5", "128M")
|
||||||
.with_reservations("0.1", "128M");
|
.with_reservations("0.1", "128M");
|
||||||
|
|
||||||
local containerSet = engine.containers(
|
local containerSet = engine.containers(
|
||||||
"pulsar",
|
"pulsar",
|
||||||
[
|
[
|
||||||
container, adminContainer
|
container, adminContainer
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
local service =
|
local service =
|
||||||
engine.service(containerSet)
|
engine.service(containerSet)
|
||||||
.with_port(6650, 6650)
|
.with_port(6650, 6650)
|
||||||
.with_port(8080, 8080);
|
.with_port(8080, 8080);
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
confVolume,
|
confVolume,
|
||||||
dataVolume,
|
dataVolume,
|
||||||
containerSet,
|
containerSet,
|
||||||
service,
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,14 @@ local images = import "values/images.jsonnet";
|
||||||
"cassandra", [ container ]
|
"cassandra", [ container ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.service(containerSet)
|
||||||
|
.with_port(9042, 9042);
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
vol,
|
vol,
|
||||||
containerSet,
|
containerSet,
|
||||||
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -3,128 +3,127 @@ local images = import "values/images.jsonnet";
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
volumes +: {
|
etcd +: {
|
||||||
etcd: {},
|
|
||||||
"minio-data": {},
|
create:: function(engine)
|
||||||
milvus: {},
|
|
||||||
|
local vol = engine.volume("etcd").with_size("20G");
|
||||||
|
|
||||||
|
local container =
|
||||||
|
engine.container("etcd")
|
||||||
|
.with_image(images.etcd)
|
||||||
|
.with_command([
|
||||||
|
"etcd",
|
||||||
|
"-advertise-client-urls=http://127.0.0.1:2379",
|
||||||
|
"-listen-client-urls",
|
||||||
|
"http://0.0.0.0:2379",
|
||||||
|
"--data-dir",
|
||||||
|
"/etcd",
|
||||||
|
])
|
||||||
|
.with_environment({
|
||||||
|
ETCD_AUTO_COMPACTION_MODE: "revision",
|
||||||
|
ETCD_AUTO_COMPACTION_RETENTION: "1000",
|
||||||
|
ETCD_QUOTA_BACKEND_BYTES: "4294967296",
|
||||||
|
ETCD_SNAPSHOT_COUNT: "50000"
|
||||||
|
})
|
||||||
|
.with_limits("1.0", "128M")
|
||||||
|
.with_reservations("0.25", "128M")
|
||||||
|
.with_port(2379, 2379, "api")
|
||||||
|
.with_volume_mount(vol, "/etcd");
|
||||||
|
|
||||||
|
local containerSet = engine.containers(
|
||||||
|
"etcd", [ container ]
|
||||||
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.service(containerSet)
|
||||||
|
.with_port(2379, 2379);
|
||||||
|
|
||||||
|
engine.resources([
|
||||||
|
vol,
|
||||||
|
containerSet,
|
||||||
|
service,
|
||||||
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
services +: {
|
mino +: {
|
||||||
|
|
||||||
|
create:: function(engine)
|
||||||
|
|
||||||
etcd: base + {
|
local vol = engine.volume("minio-data").with_size("20G");
|
||||||
image: images.etcd,
|
|
||||||
command: [
|
|
||||||
"etcd",
|
|
||||||
"-advertise-client-urls=http://127.0.0.1:2379",
|
|
||||||
"-listen-client-urls",
|
|
||||||
"http://0.0.0.0:2379",
|
|
||||||
"--data-dir",
|
|
||||||
"/etcd",
|
|
||||||
],
|
|
||||||
environment: {
|
|
||||||
ETCD_AUTO_COMPACTION_MODE: "revision",
|
|
||||||
ETCD_AUTO_COMPACTION_RETENTION: "1000",
|
|
||||||
ETCD_QUOTA_BACKEND_BYTES: "4294967296",
|
|
||||||
ETCD_SNAPSHOT_COUNT: "50000"
|
|
||||||
},
|
|
||||||
ports: [
|
|
||||||
{
|
|
||||||
src: 2379,
|
|
||||||
dest: 2379,
|
|
||||||
name: "api",
|
|
||||||
}
|
|
||||||
],
|
|
||||||
volumes: [
|
|
||||||
"etcd:/etcd"
|
|
||||||
],
|
|
||||||
deploy: {
|
|
||||||
resources: {
|
|
||||||
limits: {
|
|
||||||
cpus: '1.0',
|
|
||||||
memory: '128M'
|
|
||||||
},
|
|
||||||
reservations: {
|
|
||||||
cpus: '0.25',
|
|
||||||
memory: '128M'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
minio: base + {
|
local container =
|
||||||
image: images.minio,
|
engine.container("minio")
|
||||||
command: [
|
.with_image(images.minio)
|
||||||
"minio",
|
.with_command([
|
||||||
"server",
|
"minio",
|
||||||
"/minio_data",
|
"server",
|
||||||
"--console-address",
|
"/minio_data",
|
||||||
":9001",
|
"--console-address",
|
||||||
],
|
":9001",
|
||||||
environment: {
|
])
|
||||||
MINIO_ROOT_USER: "minioadmin",
|
.with_environment({
|
||||||
MINIO_ROOT_PASSWORD: "minioadmin",
|
MINIO_ROOT_USER: "minioadmin",
|
||||||
},
|
MINIO_ROOT_PASSWORD: "minioadmin",
|
||||||
ports: [
|
})
|
||||||
{
|
.with_limits("0.5", "128M")
|
||||||
src: 9001,
|
.with_reservations("0.25", "128M")
|
||||||
dest: 9001,
|
.with_port(9001, 9001, "api")
|
||||||
name: "api",
|
.with_volume_mount(vol, "/minio_data");
|
||||||
}
|
|
||||||
],
|
|
||||||
volumes: [
|
|
||||||
"minio-data:/minio_data",
|
|
||||||
],
|
|
||||||
deploy: {
|
|
||||||
resources: {
|
|
||||||
limits: {
|
|
||||||
cpus: '0.5',
|
|
||||||
memory: '128M'
|
|
||||||
},
|
|
||||||
reservations: {
|
|
||||||
cpus: '0.25',
|
|
||||||
memory: '128M'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
milvus: base + {
|
local containerSet = engine.containers(
|
||||||
image: images.milvus,
|
"etcd", [ container ]
|
||||||
command: [
|
);
|
||||||
"milvus", "run", "standalone"
|
|
||||||
],
|
local service =
|
||||||
environment: {
|
engine.service(containerSet)
|
||||||
ETCD_ENDPOINTS: "etcd:2379",
|
.with_port(9001, 9001);
|
||||||
MINIO_ADDRESS: "minio:9000",
|
|
||||||
},
|
engine.resources([
|
||||||
ports: [
|
vol,
|
||||||
{
|
containerSet,
|
||||||
src: 9091,
|
service,
|
||||||
dest: 9091,
|
])
|
||||||
name: "api",
|
|
||||||
},
|
},
|
||||||
{
|
|
||||||
src: 19530,
|
milvus +: {
|
||||||
dest: 19530,
|
|
||||||
name: "api2",
|
create:: function(engine)
|
||||||
}
|
|
||||||
],
|
local vol = engine.volume("milvus").with_size("20G");
|
||||||
volumes: [
|
|
||||||
"milvus:/var/lib/milvus"
|
local container =
|
||||||
],
|
engine.container("milvus")
|
||||||
deploy: {
|
.with_image(images.milvus)
|
||||||
resources: {
|
.with_command([
|
||||||
limits: {
|
"milvus", "run", "standalone"
|
||||||
cpus: '1.0',
|
])
|
||||||
memory: '256M'
|
.with_environment({
|
||||||
},
|
ETCD_ENDPOINTS: "etcd:2379",
|
||||||
reservations: {
|
MINIO_ADDRESS: "minio:9000",
|
||||||
cpus: '0.5',
|
})
|
||||||
memory: '256M'
|
.with_limits("1.0", "256M")
|
||||||
}
|
.with_reservations("0.5", "256M")
|
||||||
}
|
.with_port(9091, 9091, "api")
|
||||||
},
|
.with_port(19530, 19530, "api2")
|
||||||
},
|
.with_volume_mount(vol, "/var/lib/milvus");
|
||||||
|
|
||||||
|
local containerSet = engine.containers(
|
||||||
|
"milvus", [ container ]
|
||||||
|
);
|
||||||
|
|
||||||
|
local service =
|
||||||
|
engine.service(containerSet)
|
||||||
|
.with_port(9091, 9091)
|
||||||
|
.with_port(19530, 19530);
|
||||||
|
|
||||||
|
engine.resources([
|
||||||
|
vol,
|
||||||
|
containerSet,
|
||||||
|
service,
|
||||||
|
])
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue