added cache to llama swap
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
services.llama-swap = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.llama-swap;
|
||||
port = 8085;
|
||||
openFirewall = true;
|
||||
|
||||
@@ -71,4 +72,18 @@
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
# llama.cpp tries to create its cache under $HOME/.cache; when launched as a
|
||||
# system service HOME may default to "/" ("//.cache/..."), which is often
|
||||
# read-only. Give it a writable cache/state location.
|
||||
systemd.services.llama-swap.serviceConfig = {
|
||||
StateDirectory = "llama-swap";
|
||||
CacheDirectory = "llama-swap";
|
||||
Environment = [
|
||||
"HOME=/var/lib/llama-swap"
|
||||
"XDG_CACHE_HOME=/var/cache/llama-swap"
|
||||
"MESA_SHADER_CACHE_DIR=/var/cache/llama-swap/mesa"
|
||||
"MESA_SHADER_CACHE_MAX_SIZE=1G"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user