nixos/ollama: add vulkan acceleration option
This commit is contained in:
@@ -103,6 +103,7 @@ in
|
||||
false
|
||||
"rocm"
|
||||
"cuda"
|
||||
"vulkan"
|
||||
]
|
||||
);
|
||||
default = null;
|
||||
@@ -119,6 +120,7 @@ in
|
||||
- may require overriding gpu type with `services.ollama.rocmOverrideGfx`
|
||||
if rocm doesn't detect your AMD gpu
|
||||
- `"cuda"`: supported by most modern NVIDIA GPUs
|
||||
- `"vulkan"`: supported by most modern GPUs on Linux
|
||||
'';
|
||||
};
|
||||
rocmOverrideGfx = lib.mkOption {
|
||||
|
||||
@@ -1136,6 +1136,7 @@ in
|
||||
ollama = runTest ./ollama.nix;
|
||||
ollama-cuda = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./ollama-cuda.nix;
|
||||
ollama-rocm = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./ollama-rocm.nix;
|
||||
ollama-vulkan = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./ollama-vulkan.nix;
|
||||
ombi = runTest ./ombi.nix;
|
||||
omnom = runTest ./omnom;
|
||||
oncall = runTest ./web-apps/oncall.nix;
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
name = "ollama-vulkan";
|
||||
meta.maintainers = with lib.maintainers; [ abysssol ];
|
||||
|
||||
nodes.vulkan =
|
||||
{ ... }:
|
||||
{
|
||||
services.ollama.enable = true;
|
||||
services.ollama.acceleration = "vulkan";
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
vulkan.wait_for_unit("multi-user.target")
|
||||
vulkan.wait_for_open_port(11434)
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user