-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
103 lines (94 loc) · 4.27 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
version: "3.8"
# Compose file build variables set in .env
services:
supervisor:
platform: linux/amd64
build:
context: ./build
args:
IMAGE_BASE: ${IMAGE_BASE:-ghcr.io/ai-dock/linux-desktop:jupyter-pytorch-2.2.0-py3.10-cuda-11.8.0-runtime-22.04}
tags:
- "ghcr.io/ai-dock/onetrainer:${IMAGE_TAG:-jupyter-pytorch-2.2.0-py3.10-cuda-11.8.0-runtime-22.04}"
image: ghcr.io/ai-dock/onetrainer:${IMAGE_TAG:-jupyter-pytorch-2.2.0-py3.10-cuda-11.8.0-runtime-22.04}
shm_size: 12G
## For Nvidia GPU's - You probably want to uncomment this
#deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]
devices:
- "/dev/dri:/dev/dri"
## For AMD GPU
#- "/dev/kfd:/dev/kfd"
volumes:
## Workspace
- ./workspace:${WORKSPACE:-/workspace/}:rshared
# You can share /workspace/storage with other non-OneTrainer containers. See README
#- /path/to/common_storage:${WORKSPACE:-/workspace/}storage/: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
- ${WEBRTC_PORT_HOST:-6100}:${WEBRTC_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
- TURN_HOST=${TURN_HOST:-127.0.0.1}
- TURN_PORT=${TURN_PORT:-3478}
- TURN_PROTOCOL=${TURN_PROTOCOL:-tcp}
- TURN_USERNAME=${TURN_USERNAME:-}
- TURN_PASSWORD=${TURN_PASSWORD:-}
- WEBRTC_ENABLE_RESIZE=${WEBRTC_ENABLE_RESIZE:-false}
- WEBRTC_ENCODER=${WEBRTC_ENCODER:-nvh264enc}
- 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:-}
- WEBRTC_PORT_HOST=${WEBRTC_PORT_HOST:-6100}
- WEBRTC_METRICS_PORT=${WEBRTC_METRICS_PORT:-26100}
- WEBRTC_URL=${WEBRTC_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=https://raw.githubusercontent.com/ai-dock/python/main/config/provisioning/default.sh
- ONETRAINER_FLAGS=${ONETRAINER_FLAGS:-}
- JUPYTER_PORT_HOST=${JUPYTER_PORT_HOST:-8888}
- JUPYTER_METRICS_PORT=${JUPYTER_METRICS_PORT:-28888}
- JUPYTER_URL=${JUPYTER_URL:-}