add stable diffusion

This commit is contained in:
2025-01-26 01:43:59 -06:00
parent 528749a1b7
commit 6e0c77f3c2
4 changed files with 87 additions and 0 deletions

View File

@@ -43,6 +43,8 @@ services:
container_name: ollama
environment:
- OLLAMA_KEEP_ALIVE=24h
labels:
- "com.centurylinklabs.watchtower.scope=ollama"
restart: always
deploy:
resources:

View File

@@ -0,0 +1 @@
TS_AUTHKEY=""

View File

@@ -0,0 +1,68 @@
---
services:
tailscale-stable-diffusion:
image: ghcr.io/tailscale/tailscale:latest
container_name: tailscale-stable-diffusion
cap_add:
- net_admin
- sys_module
environment:
- TS_STATE_DIR=/var/lib/tailscale
- TS_ENABLE_METRICS=true
- TS_HOSTNAME=stable-diffusion-pd05wd
- TS_SERVE_CONFIG=/config/serve.json
env_file:
- .ts-env
labels:
- "com.centurylinklabs.watchtower.scope=stable-diffusion"
network_mode: service:stable-diffusion
restart: always
volumes:
- tailscale:/var/lib/tailscale
- ${PWD}/serve.json:/config/serve.json
devices:
- /dev/net/tun:/dev/net/tun
watchtower:
image: ghcr.io/containrrr/watchtower:latest
container_name: stable-diffusion-watchtower
command: --scope stable-diffusion
environment:
- TZ=America/Chicago
- WATCHTOWER_HTTP_API_METRICS=true
- WATCHTOWER_HTTP_API_TOKEN=token
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_POLL_INTERVAL=3600
labels:
- "com.centurylinklabs.watchtower.scope=stable-diffusion"
network_mode: service:stable-diffusion
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
stable-diffusion:
image: ghcr.io/ai-dock/stable-diffusion-webui:latest-cpu
container_name: stable-diffusion
environment:
- WEBUI_ARGS="--api --listen"
- CF_QUICK_TUNNELS=false
- WEB_ENABLE_AUTH=false
- PORT="7860"
- SUPERVISOR_NO_AUTOSTART=jupyter,syncthing
labels:
- "com.centurylinklabs.watchtower.scope=stable-diffusion"
restart: always
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: ["gpu"]
count: all
volumes:
- workspace:/workspace:rshared
- ./models:/opt/stable-diffusion-webui/models/Stable-diffusion
volumes:
tailscale:
workspace:

View File

@@ -0,0 +1,16 @@
{
"TCP": {
"443": {
"HTTPS": true
}
},
"Web": {
"${TS_CERT_DOMAIN}:443": {
"Handlers": {
"/": {
"Proxy": "http://127.0.0.1:7860"
}
}
}
}
}