mirror of
https://github.com/dockur/windows.git
synced 2024-11-15 01:34:41 +00:00
Update compose.yml
This commit is contained in:
parent
7e3c287f24
commit
52758f423a
25
compose.yml
25
compose.yml
@ -1,9 +1,13 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
windows:
|
windows:
|
||||||
image: dockurr/windows
|
image: dockurr/windows
|
||||||
container_name: windows
|
container_name: windows
|
||||||
environment:
|
environment:
|
||||||
VERSION: "win11"
|
VERSION: "win11"
|
||||||
|
# Set to GPU index (e.g., "0"), PCI address, or "none"
|
||||||
|
NVIDIA_VISIBLE_DEVICES: ${GPU_ID:-none}
|
||||||
devices:
|
devices:
|
||||||
- /dev/kvm
|
- /dev/kvm
|
||||||
cap_add:
|
cap_add:
|
||||||
@ -13,3 +17,24 @@ services:
|
|||||||
- 3389:3389/tcp
|
- 3389:3389/tcp
|
||||||
- 3389:3389/udp
|
- 3389:3389/udp
|
||||||
stop_grace_period: 2m
|
stop_grace_period: 2m
|
||||||
|
# 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
|
||||||
|
Loading…
Reference in New Issue
Block a user