ollama: move rocm option to program
This commit is contained in:
parent
e694b1ab5f
commit
6ea1430eee
4 changed files with 6 additions and 9 deletions
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
gpu = "amd";
|
gpu = "amd";
|
||||||
|
rocm = "10.3.0"; # 10.3.1
|
||||||
};
|
};
|
||||||
|
|
||||||
storage.mnt = [
|
storage.mnt = [
|
||||||
|
|
|
@ -28,10 +28,6 @@
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
fw-fanctrl.enable = true;
|
fw-fanctrl.enable = true;
|
||||||
|
|
||||||
# https://github.com/ollama/ollama/blob/main/docs/gpu.md#overrides
|
|
||||||
#?? nix run nixpkgs#rocmPackages.rocminfo | grep gfx
|
|
||||||
ollama.rocmOverrideGfx = "10.3.0"; # 10.3.1
|
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
|
@ -17,11 +16,11 @@ in {
|
||||||
services.ollama = {
|
services.ollama = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
package = pkgs.ollama-rocm;
|
|
||||||
|
|
||||||
loadModels = [
|
# https://wiki.nixos.org/wiki/Ollama#AMD_GPU_with_open_source_driver
|
||||||
"deepseek-r1" # https://github.com/deepseek-ai/DeepSeek-R1
|
# https://github.com/ollama/ollama/blob/main/docs/gpu.md#overrides
|
||||||
];
|
#?? nix run nixpkgs#rocmPackages.rocminfo | grep gfx
|
||||||
|
rocmOverrideGfx = with config.custom.settings.hardware; mkIf (isString rocm) rocm;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ in {
|
||||||
options.custom.settings.hardware = {
|
options.custom.settings.hardware = {
|
||||||
enable = mkOption {default = false;};
|
enable = mkOption {default = false;};
|
||||||
gpu = mkOption {default = null;};
|
gpu = mkOption {default = null;};
|
||||||
|
rocm = mkOption {default = null;};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
Loading…
Add table
Reference in a new issue