From 974c22a917f6dd15d1940a832cd51125bc7e3394 Mon Sep 17 00:00:00 2001 From: jacobi petrucciani Date: Tue, 14 Jan 2025 18:42:39 -0500 Subject: [PATCH] add kokoro ui --- hosts/titan/configuration.nix | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/hosts/titan/configuration.nix b/hosts/titan/configuration.nix index c1fcabc3..c01e38f1 100644 --- a/hosts/titan/configuration.nix +++ b/hosts/titan/configuration.nix @@ -158,18 +158,32 @@ in virtualisation = { docker.enable = true; - podman.enable = true; - oci-containers.containers = { - kokoro = { - image = "ghcr.io/remsky/kokoro-fastapi-gpu:v0.1.0"; - ports = [ "8880:8880" ]; - volumes = [ "/var/lib/kokoro/voices:/app/api/src/voices" ]; - devices = [ "nvidia.com/gpu=0" ]; - environment = { - PYTHONPATH = "/app:/app/models"; + oci-containers.containers = + let + kokoro_version = "v0.1.0"; + kokoro_api_port = 8880; + kokoro_ui_port = 7860; + in + { + kokoro = { + image = "ghcr.io/remsky/kokoro-fastapi-gpu:${kokoro_version}"; + ports = [ "${toString kokoro_api_port}:8880" ]; + volumes = [ "/var/lib/kokoro/voices:/app/api/src/voices" ]; + devices = [ "nvidia.com/gpu=0" ]; + environment = { + PYTHONPATH = "/app:/app/models"; + }; + }; + kokoro-ui = { + image = "ghcr.io/remsky/kokoro-fastapi-ui:${kokoro_version}"; + ports = [ "${toString kokoro_ui_port}:7860" ]; + volumes = [ "/var/lib/kokoro/data:/app/ui/data" ]; + environment = { + PYTHONUNBUFFERED = "1"; + DISABLE_LOCAL_SAVING = "false"; + }; }; }; - }; }; hardware = { nvidia = {