diff --git a/hosts/ABOUTME.md b/hosts/ABOUTME.md index 4ea60cd..ee0aad0 100644 --- a/hosts/ABOUTME.md +++ b/hosts/ABOUTME.md @@ -33,8 +33,8 @@ hosts/ | `fwbook/` | fwbook | Framework 13 AMD — personal laptop / daily driver | | `hl-fwdesk/` | hl-fwdesk | Framework Desktop AI Max 300 — AI workstation; buildbot-nix CI worker (4 cores) | | `hl-fws1/` | hl-fws1 | Framework 11th Intel — K3s server node | -| `hl-bigbox1/` | hl-bigbox1 | AI/compute server (NVIDIA + AMD) | -| `hl-bigbox2/` | hl-bigbox2 | NFS storage server; Immich (docker, `immich.home.sosnovsky.ca`) | +| `hl-bigbox1/` | hl-bigbox1 | AI/compute server (NVIDIA + AMD); Immich machine-learning (CUDA) | +| `hl-bigbox2/` | hl-bigbox2 | NFS storage server; Immich server/db (docker, `immich.home.sosnovsky.ca`) | | `hl-minipc1/` | hl-minipc1 | Core infra: Gitea (native or containerized), nix-serve, registry, Buzz (docker, `buzz-manage` CLI) | | `hl-minipc2/` | hl-minipc2 | Container/media server | | `hl-minipc3/` | hl-minipc3 | K3s worker node; central Caddy reverse-proxy (`*.home.sosnovsky.ca`, plus `gitea.skyg.ca` HTTP/SSH); buildbot-nix CI master + worker (2 cores) | diff --git a/hosts/hl-bigbox1/services/default.nix b/hosts/hl-bigbox1/services/default.nix index e91fdd6..90c1475 100644 --- a/hosts/hl-bigbox1/services/default.nix +++ b/hosts/hl-bigbox1/services/default.nix @@ -1,6 +1,7 @@ { imports = [ ./jellyfin.nix + ./immich-ml.nix ./portainer.nix ./timers.nix ]; diff --git a/hosts/hl-bigbox1/services/immich-ml.nix b/hosts/hl-bigbox1/services/immich-ml.nix new file mode 100644 index 0000000..596d2e6 --- /dev/null +++ b/hosts/hl-bigbox1/services/immich-ml.nix @@ -0,0 +1,33 @@ +{ config, ... }: +let + version = "v3"; + app = config.skyg.internalNetworkingMap.apps.immich-ml; +in +{ + skyg.nixos.common.container-services.immich-ml = { + enable = true; + autoUpdate.enable = true; + networks.lan = config.skyg.nixos.common.containers.networks.ipvlanLab.compose; + volumes.model-cache = { }; + services.immich-machine-learning = { + image = "ghcr.io/immich-app/immich-machine-learning:${version}-cuda"; + networks.lan.ipv4_address = app.ip; + volumes = [ "model-cache:/cache" ]; + environment.NVIDIA_VISIBLE_DEVICES = "all"; + deploy.resources = { + limits = { + cpus = "4"; + memory = "16G"; + }; + reservations.devices = [ + { + driver = "cdi"; + device_ids = [ "nvidia.com/gpu=all" ]; + capabilities = [ "gpu" ]; + } + ]; + }; + restart = "always"; + }; + }; +} diff --git a/hosts/hl-bigbox2/services/immich.nix b/hosts/hl-bigbox2/services/immich.nix index f5df623..b7738a9 100644 --- a/hosts/hl-bigbox2/services/immich.nix +++ b/hosts/hl-bigbox2/services/immich.nix @@ -11,6 +11,8 @@ let POSTGRES_USER = "immich"; POSTGRES_DB = "immich"; DB_DATABASE_NAME = "immich"; + + IMMICH_MACHINE_LEARNING_URL = "http://${config.skyg.internalNetworkingMap.apps.immich-ml.ip}:3003"; }; nfsVolume = skygUtils.container-services.nfsVols.tnas1; in @@ -26,14 +28,13 @@ in }; volumes = { family-storage = nfsVolume "/mnt/EightTerra/FamilyStorage"; - model-cache = { }; }; services.immich-server = { image = "ghcr.io/immich-app/immich-server:${version}"; environmentFiles = [ config.age.secrets.immich-shared.path ]; environment = envVars; deploy.resources.limits = { - cpus = "1"; + cpus = "2"; memory = "8G"; }; networks = { @@ -50,18 +51,6 @@ in }; restart = "always"; }; - services.immich-machine-learning = { - image = "ghcr.io/immich-app/immich-machine-learning:${version}"; - environmentFiles = [ config.age.secrets.immich-shared.path ]; - environment = envVars; - networks.main = { }; - volumes = [ "model-cache:/cache" ]; - deploy.resources.limits = { - cpus = "1"; - memory = "8G"; - }; - restart = "always"; - }; services.redis = { image = "docker.io/valkey/valkey:9@sha256:c123e3715db63d06d4ad6964884037aa0d5d4d703939b9929954112889708e1d"; networks.main = { }; diff --git a/modules/main.nix b/modules/main.nix index 345420d..52a9755 100644 --- a/modules/main.nix +++ b/modules/main.nix @@ -110,6 +110,7 @@ in gitea = { ip = "10.0.101.8"; }; public-gitea = { ip = "10.0.101.9"; }; immich = { ip = "10.0.101.10"; }; + immich-ml = { ip = "10.0.101.11"; }; jellyfin = { ip = "10.0.101.5"; }; nvr = { ip = "10.0.101.6"; }; portainer = { ip = "10.0.101.241"; };