From 8120b0eb813c57c8ce4d3d2fc86827e9dc16f572 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Sat, 9 May 2026 22:19:20 -0500 Subject: [PATCH] feat: add invoke --- hosts/pd05wd/invoke-ai/.ts-env | 1 + hosts/pd05wd/invoke-ai/compose.yaml | 41 ++++++++++++++++++++++ hosts/pd05wd/invoke-ai/serve.json | 16 +++++++++ hosts/pd05wd/ollama/compose.yaml | 4 +-- hosts/pd05wd/stable-diffusion/compose.yaml | 4 +-- 5 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 hosts/pd05wd/invoke-ai/.ts-env create mode 100644 hosts/pd05wd/invoke-ai/compose.yaml create mode 100644 hosts/pd05wd/invoke-ai/serve.json diff --git a/hosts/pd05wd/invoke-ai/.ts-env b/hosts/pd05wd/invoke-ai/.ts-env new file mode 100644 index 000000000..4c297bf5a --- /dev/null +++ b/hosts/pd05wd/invoke-ai/.ts-env @@ -0,0 +1 @@ +TS_AUTHKEY="" diff --git a/hosts/pd05wd/invoke-ai/compose.yaml b/hosts/pd05wd/invoke-ai/compose.yaml new file mode 100644 index 000000000..e9986514c --- /dev/null +++ b/hosts/pd05wd/invoke-ai/compose.yaml @@ -0,0 +1,41 @@ +services: + tailscale-invoke-ai: + image: ghcr.io/tailscale/tailscale:latest + container_name: tailscale-invoke-ai + cap_add: + - net_admin + - sys_module + environment: + - TS_STATE_DIR=/var/lib/tailscale + - TS_ENABLE_METRICS=true + - TS_HOSTNAME=invoke-ai-pd05wd + - TS_SERVE_CONFIG=/config/serve.json + env_file: + - .ts-env + network_mode: service:invoke-ai + restart: always + volumes: + - tailscale:/var/lib/tailscale + - ./serve.json:/config/serve.json + devices: + - /dev/net/tun:/dev/net/tun + + invoke-ai: + image: ghcr.io/invoke-ai/invokeai:main-cuda + container_name: stable-diffusion + environment: + - INVOKEAI_ROOT=~/invokeai + - INVOKEAI_DEVICE=cuda + restart: always + deploy: + resources: + reservations: + devices: + - driver: nvidia + capabilities: ["gpu"] + count: all + volumes: + - ./invokeai:/invokeai + +volumes: + tailscale: diff --git a/hosts/pd05wd/invoke-ai/serve.json b/hosts/pd05wd/invoke-ai/serve.json new file mode 100644 index 000000000..56a691c3d --- /dev/null +++ b/hosts/pd05wd/invoke-ai/serve.json @@ -0,0 +1,16 @@ +{ + "TCP": { + "443": { + "HTTPS": true + } + }, + "Web": { + "${TS_CERT_DOMAIN}:443": { + "Handlers": { + "/": { + "Proxy": "http://127.0.0.1:9090" + } + } + } + } +} diff --git a/hosts/pd05wd/ollama/compose.yaml b/hosts/pd05wd/ollama/compose.yaml index e86df0bd1..673737453 100644 --- a/hosts/pd05wd/ollama/compose.yaml +++ b/hosts/pd05wd/ollama/compose.yaml @@ -1,7 +1,7 @@ --- services: tailscale-ollama: - image: ghcr.io/tailscale/tailscale:latest@sha256:95e528798bebe75f39b10e74e7051cf51188ee615934f232ba7ad06a3390ffa1 + image: ghcr.io/tailscale/tailscale:latest container_name: tailscale-ollama cap_add: - net_admin @@ -20,7 +20,7 @@ services: - /dev/net/tun:/dev/net/tun ollama: - image: ollama/ollama:latest@sha256:5a5d014aa774f78ebe1340c0d4afc2e35afc12a2c3b34c84e71f78ea20af4ba3 + image: ollama/ollama:latest container_name: ollama environment: - OLLAMA_KEEP_ALIVE=24h diff --git a/hosts/pd05wd/stable-diffusion/compose.yaml b/hosts/pd05wd/stable-diffusion/compose.yaml index ec9028aaa..c4c929fd9 100644 --- a/hosts/pd05wd/stable-diffusion/compose.yaml +++ b/hosts/pd05wd/stable-diffusion/compose.yaml @@ -1,7 +1,7 @@ --- services: tailscale-stable-diffusion: - image: ghcr.io/tailscale/tailscale:latest@sha256:95e528798bebe75f39b10e74e7051cf51188ee615934f232ba7ad06a3390ffa1 + image: ghcr.io/tailscale/tailscale:latest container_name: tailscale-stable-diffusion cap_add: - net_admin @@ -22,7 +22,7 @@ services: - /dev/net/tun:/dev/net/tun stable-diffusion: - image: ghcr.io/ai-dock/stable-diffusion-webui:latest-cuda@sha256:bc4b2b12ac8d030cc5daf25e2c32517709b7c15f59a32685c4c1a14a9606eb42 + image: ghcr.io/ai-dock/stable-diffusion-webui:latest-cuda container_name: stable-diffusion environment: - WEBUI_ARGS="--api --listen"