30 lines
823 B
Nix
30 lines
823 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
virtualisation.oci-containers.containers.litellm = {
|
|
image = "ghcr.io/berriai/litellm:main-stable";
|
|
ports = ["127.0.0.1:4000:4000"];
|
|
environmentFiles = [config.age.secrets.litellm-env.path];
|
|
environment = {
|
|
ANONYMIZED_TELEMETRY = "False";
|
|
DO_NOT_TRACK = "True";
|
|
SCARF_NO_ANALYTICS = "True";
|
|
STORE_MODEL_IN_DB = "True";
|
|
};
|
|
extraOptions = ["--add-host=postgres:10.89.0.1" "--ip=10.89.0.30" "--network=web"];
|
|
};
|
|
|
|
# Traefik configuration
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
services.litellm.loadBalancer.servers = [{url = "http://127.0.0.1:4000/";}];
|
|
routers.litellm = {
|
|
rule = "Host(`llm.az-gruppe.com`)";
|
|
tls.certResolver = "ionos";
|
|
service = "litellm";
|
|
entrypoints = "websecure";
|
|
};
|
|
};
|
|
}
|