This repository has been archived on 2024-08-30. You can view files and clone it, but cannot push or open issues or pull requests.
infrastructure/hosts/carbon/services/ai.nix
2024-05-29 17:15:20 +02:00

19 lines
348 B
Nix

{ pkgs, config, ... }:
let
ollamaPort = "4827";
in
{
services.ollama.listenAddress = "0.0.0.0:${ollamaPort}";
services.ollama.environmentVariables = {
"CUDA_VISIBLE_DEVICES" = "GPU-cf2321f0-d34b-ec9b-31e9-8c0c69e1444a";
OLLAMA_LLM_LIBRARY = "gpu";
};
services.ollama.enable = true;
services.ollama.acceleration = "cuda";
}