fix ollama, remove trr
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
vars = import ./vars.nix;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
ollama = {
|
||||
@@ -20,6 +23,7 @@
|
||||
"qwen2.5-coder:1.5b-base"
|
||||
"nomic-embed-text:latest"
|
||||
];
|
||||
models = vars.primary_ollama;
|
||||
environmentVariables = {
|
||||
FLASH_ATTENTION = "1";
|
||||
OLLAMA_KV_CACHE_TYPE = "q8_0";
|
||||
@@ -35,10 +39,12 @@
|
||||
# context length for agents
|
||||
OLLAMA_CONTEXT_LENGTH = "64000";
|
||||
};
|
||||
openFirewall = true;
|
||||
};
|
||||
open-webui = {
|
||||
enable = true;
|
||||
port = 21212;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
users.users.ollama = {
|
||||
@@ -50,4 +56,16 @@
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups.ollama = { };
|
||||
systemd.services = {
|
||||
ollama.serviceConfig = {
|
||||
Nice = 19;
|
||||
IOSchedulingPriority = 7;
|
||||
};
|
||||
ollama-model-loader.serviceConfig = {
|
||||
Nice = 19;
|
||||
CPUWeight = 50;
|
||||
IOSchedulingClass = "idle";
|
||||
IOSchedulingPriority = 7;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user