From 832761b32f020e95061ff2161e11e4cf17f01587 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Wed, 11 Dec 2024 00:49:55 +0000 Subject: [PATCH] feat(flake.nix, homeassistant.nix): enable CUDA for ctranslate2 and set device to cuda --- flake.nix | 9 ++++++++- hosts/architect/homeassistant.nix | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index d0d28c4..7934711 100644 --- a/flake.nix +++ b/flake.nix @@ -75,7 +75,14 @@ in import nixpkgs { inherit system config; - overlays = additionalOverlays ++ extOverlays; + overlays = additionalOverlays ++ extOverlays ++ [ + (final: prev: { + ctranslate2 = prev.ctranslate2.override { + withCUDA = true; + withCuDNN = true; + }; + }) + ]; }; wrapUtils = { pkgs }: diff --git a/hosts/architect/homeassistant.nix b/hosts/architect/homeassistant.nix index 99906e5..0c70049 100644 --- a/hosts/architect/homeassistant.nix +++ b/hosts/architect/homeassistant.nix @@ -15,7 +15,7 @@ in enable = true; uri = "tcp://127.0.0.1:${toString whisperPort}"; model = "large-v3"; - device = "auto"; + device = "cuda"; language = "en"; }; };