69 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			69 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| ---
 | |
| 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
 | |
|             - ./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-cuda
 | |
|         container_name: stable-diffusion
 | |
|         environment:
 | |
|             - WEBUI_ARGS="--api --listen"
 | |
|             - CF_QUICK_TUNNELS=false
 | |
|             - WEB_ENABLE_AUTH=false
 | |
|             - PORT="17860"
 | |
|             - 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:
 |