windows/compose.yml

41 lines
1.0 KiB
YAML
Raw Normal View History

2024-10-30 13:24:22 +00:00
version: '3'
2024-01-14 16:16:02 +00:00
services:
windows:
2024-01-15 22:47:51 +00:00
image: dockurr/windows
2024-01-14 16:16:02 +00:00
container_name: windows
environment:
VERSION: "win11"
2024-10-30 13:24:22 +00:00
# Set to GPU index (e.g., "0"), PCI address, or "none"
NVIDIA_VISIBLE_DEVICES: ${GPU_ID:-none}
2024-01-14 16:16:02 +00:00
devices:
- /dev/kvm
cap_add:
- NET_ADMIN
ports:
- 8006:8006
2024-01-17 02:40:19 +00:00
- 3389:3389/tcp
- 3389:3389/udp
2024-01-14 16:16:02 +00:00
stop_grace_period: 2m
2024-10-30 13:24:22 +00:00
# Add script execution hooks using local path
labels:
- "com.docker.compose.project.working_dir=${PWD}"
hooks:
pre-start:
cmd: ${PWD}/gpu-switch.sh start windows
post-stop:
cmd: ${PWD}/gpu-switch.sh stop windows
# Add privileged mode and additional capabilities for GPU management
privileged: true
volumes:
- ${PWD}/gpu-switch.sh:/usr/local/bin/gpu-switch.sh:ro
- /dev/bus/usb:/dev/bus/usb
- /dev/input:/dev/input
# Add volume for persistence if needed
- windows_data:/mnt/user/domains/windows
restart: unless-stopped
volumes:
windows_data:
external: true