fix llm stuff

This commit is contained in:
atagen 2024-09-11 10:15:54 +10:00
parent ad421cea84
commit 5786863608
12 changed files with 131 additions and 95 deletions

View file

@ -1,6 +1,6 @@
{
lib,
pkgs,
config,
...
}: let
port = 3021;
@ -17,19 +17,25 @@ in {
};
};
services.podman = {
containers.anything-llm = let
str = builtins.toString;
in {
image = "mintplexlabs/anythingllm";
ports = ["${str port}:3001"];
autostart = false;
networks = ["ollama"];
unitConfig = {Requires = ["podman-ollama.service"];};
extraOptions = [
"--health-cmd"
(lib.escapeShellArg "bash -c 'cat < /dev/null > /dev/tcp/localhost/3001'")
];
};
services.podman.containers.anything-llm = let
str = builtins.toString;
username = config.mainUser;
in {
image = "mintplexlabs/anythingllm";
ports = ["${str port}:3001"];
autostart = false;
networks = ["ollama"];
volumes = let
share = "/home/${username}/.local/share/anything-llm";
in [
"${share}:/storage"
"${share}/.env:/app/server/.env"
];
environment.STORAGE_LOCATION = "/storage";
unitConfig = {Requires = ["podman-ollama.service"];};
extraOptions = [
"--health-cmd"
(lib.escapeShellArg "bash -c 'cat < /dev/null > /dev/tcp/localhost/3001'")
];
};
}