-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yaml
117 lines (107 loc) · 4.7 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: "3.8"
# Compose file build variables set in .env
services:
supervisor:
build:
context: ./build
args:
IMAGE_BASE: ${IMAGE_BASE:-ghcr.io/ai-dock/base-image:v2-cuda-12.1.1-cuddn8-runtime-22.04}
SELKIES_VERSION: ${SELKIES_VERSION:-latest}
tags:
- "ghcr.io/ai-dock/linux-desktop:${IMAGE_TAG:-v2-cuda-12.1.1-cudnn8-runtime-22.04}"
image: ghcr.io/ai-dock/linux-desktop:${IMAGE_TAG:-v2-cuda-12.1.1-cudnn8-runtime-22.04}
shm_size: 2G
## For Nvidia GPU's - You probably want to uncomment this
#deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]
cap_add:
- SYS_ADMIN
security_opt:
- seccomp:unconfined
devices:
- "/dev/dri:/dev/dri"
# For AMD GPU
#- "/dev/kfd:/dev/kfd"
volumes:
- ./config/rclone:/etc/rclone
# Workspace
- ./workspace:${WORKSPACE:-/workspace}:rshared
# Will echo to root-owned authorized_keys file;
# Avoids changing local file owner
- ./config/authorized_keys:/root/.ssh/authorized_keys_mount
- ./config/provisioning/default.sh:/opt/ai-dock/bin/provisioning.sh
ports:
# SSH available on host machine port 2222 to avoid conflict. Change to suit
- ${SSH_PORT_HOST:-2222}:${SSH_PORT_LOCAL:-22}
# Web UI for easy service access
- ${SERVICEPORTAL_PORT_HOST:-1111}:${SERVICEPORTAL_PORT_HOST:-1111}
# Coturn
- ${COTURN_PORT_HOST:-3478}:${COTURN_PORT_HOST:-3478}
# Selkies
- ${SELKIES_PORT_HOST:-6100}:${SELKIES_PORT_HOST:-6100}
# VNC
- ${VNC_PORT_HOST:-6200}:${VNC_PORT_HOST:-6200}
# Syncthing
- ${SYNCTHING_UI_PORT_HOST:-8384}:${SYNCTHING_UI_PORT_HOST:-8384}
- ${SYNCTHING_TRANSPORT_PORT_HOST:-22999}:${SYNCTHING_TRANSPORT_PORT_HOST:-22999}
environment:
# Don't enclose values in quotes
- ENABLE_COTURN=${ENABLE_COTURN:-false}
# External IP
- COTURN_LISTEN_ADDRESS=${COTURN_LISTEN_ADDRESS:-127.0.0.1}
- COTURN_PORT_HOST=${COTURN_PORT_HOST:-3478}
- COTURN_USER=${COTURN_USER:-user}
# Auto-generated when empty
- COTURN_PASSWORD=${COTURN_PASSWORD:-}
# External IP if coturn
- SELKIES_TURN_HOST=${SELKIES_TURN_HOST:-127.0.0.1}
- SELKIES_TURN_PORT=${SELKIES_TURN_PORT:-3478}
- SELKIES_TURN_PROTOCOL=${SELKIES_TURN_PROTOCOL:-tcp}
- SELKIES_TURN_USERNAME=${SELKIES_TURN_USERNAME:-}
- SELKIES_TURN_PASSWORD=${SELKIES_TURN_PASSWORD:-}
- SELKIES_ENABLE_RESIZE=${SELKIES_ENABLE_RESIZE:-false}
- SELKIES_ENCODER=${SELKIES_ENCODER:-nvh264enc}
- SELKIES_ARGS=${SELKIES_ARGS:-}
- PIPEWIRE_LATENCY=${PIPEWIRE_LATENCY:-32/48000}
- PULSE_LATENCY_MSEC=${PULSE_LATENCY_MSEC:-60}
- DIRECT_ADDRESS=${DIRECT_ADDRESS:-127.0.0.1}
- DIRECT_ADDRESS_GET_WAN=${DIRECT_ADDRESS_GET_WAN:-false}
- WORKSPACE=${WORKSPACE:-/workspace}
- WORKSPACE_SYNC=${WORKSPACE_SYNC:-true}
- CF_TUNNEL_TOKEN=${CF_TUNNEL_TOKEN:-}
- CF_QUICK_TUNNELS=${CF_QUICK_TUNNELS:-true}
- WEB_ENABLE_AUTH=${WEB_ENABLE_AUTH:-true}
- WEB_USER=${WEB_USER:-user}
- WEB_PASSWORD=${WEB_PASSWORD:-password}
- SSH_PORT_HOST=${SSH_PORT_HOST:-2222}
- SSH_PORT_LOCAL=${SSH_PORT_LOCAL:-22}
- SERVICEPORTAL_PORT_HOST=${SERVICEPORTAL_PORT_HOST:-1111}
- SERVICEPORTAL_METRICS_PORT=${SERVICEPORTAL_METRICS_PORT:-21111}
- SERVICEPORTAL_URL=${SERVICEPORTAL_URL:-}
- VNC_PORT_HOST=${VNC_PORT_HOST:-6200}
- VNC_METRICS_PORT=${VNC_METRICS_PORT:-26200}
- VNC_URL=${VNC_URL:-}
- SELKIES_PORT_HOST=${SELKIES_PORT_HOST:-6100}
- SELKIES_METRICS_PORT=${SELKIES_METRICS_PORT:-26100}
- SELKIES_URL=${SELKIES_URL:-}
- SERVERLESS=${SERVERLESS:-false}
- SYNCTHING_UI_PORT_HOST=${SYNCTHING_UI_PORT_HOST:-8384}
- SYNCTHING_TRANSPORT_PORT_HOST=${SYNCTHING_TRANSPORT_PORT_HOST:-22999}
- SYNCTHING_URL=${SYNCTHING_URL:-}
#- PROVISIONING_SCRIPT=${PROVISIONING_SCRIPT:-}
# Vast.ai KVM testing
- VAST_TCP_PORT_1111=${VAST_TCP_PORT_1111}
- VAST_TCP_PORT_2222=${VAST_TCP_PORT_2222}
- VAST_TCP_PORT_6100=${VAST_TCP_PORT_6100}
- VAST_TCP_PORT_6200=${VAST_TCP_PORT_6200}
- VAST_TCP_PORT_8384=${VAST_TCP_PORT_8384}
- VAST_TCP_PORT_70000=${VAST_TCP_PORT_70000}
- VAST_TCP_PORT_72299=${VAST_TCP_PORT_72299}
# Magic bullet to solve networking issues - I don't like it
# Turn server works fine both within local network and for internet
#network_mode: "host"