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

19 lines
348 B
Nix
Raw Permalink Normal View History

2024-05-29 17:15:20 +02:00
{ 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";
}