diff --git a/machines/krz01/_configuration.nix b/machines/krz01/_configuration.nix index b3138e2..8d34622 100644 --- a/machines/krz01/_configuration.nix +++ b/machines/krz01/_configuration.nix @@ -12,11 +12,11 @@ lib.extra.mkConfig { enabledServices = [ # INFO: This list needs to stay sorted alphabetically + # Machine learning API machine + "microvm-ml01" "microvm-router01" "nvidia-tesla-k80" "proxmox" - # Machine learning API machine - "microvm-ml01" ]; extraConfig = { @@ -57,12 +57,29 @@ lib.extra.mkConfig { ]; })) ]; - services.ollama = { - enable = true; - package = pkgs.callPackage ./ollama.nix { - cudaPackages = pkgs.cudaPackages_11; - # We need to thread our nvidia x11 driver for CUDA. - extraLibraries = [ config.hardware.nvidia.package ]; + + services = { + nginx = { + enable = true; + recommendedProxySettings = true; + virtualHosts."ollama01.beta.dgnum.eu" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://${config.services.ollama.host}:${toString config.services.ollama.port}"; + basicAuthFile = pkgs.writeText "ollama-htpasswd" '' + raito:$y$j9T$UDEHpLtM52hRGK0I4qT6M0$N75AhENLqgtJnTGaPzq51imhjZvuPr.ow81Co1ZTcX2 + ''; + }; + }; + }; + ollama = { + enable = true; + package = pkgs.callPackage ./ollama.nix { + cudaPackages = pkgs.cudaPackages_11; + # We need to thread our nvidia x11 driver for CUDA. + extraLibraries = [ config.hardware.nvidia.package ]; + }; }; }; }; diff --git a/meta/dns.nix b/meta/dns.nix index 32601d6..59007dc 100644 --- a/meta/dns.nix +++ b/meta/dns.nix @@ -127,6 +127,14 @@ let "cas-eleves" "vote" ]; + + krz01.dual = [ + # Beta-grade machine learning API servers + "ollama01.beta" + "openui.beta" + "whisper.beta" + "stable-diffusion.beta" + ]; } ) );