forked from hlm628/dive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
129 lines (119 loc) · 4.08 KB
/
docker-compose.yml
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
118
119
120
121
122
123
124
125
126
127
128
129
## Use this to start the girder/ girder-worker ecosystem
# Use YAML anchors for the common config between both workers
x-worker: &base-worker
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
ipc: host
build:
context: .
dockerfile: docker/girder_worker.Dockerfile
image: kitware/viame-worker:${TAG:-latest}
volumes:
- addons:/tmp/addons:ro # readonly
labels:
- "com.centurylinklabs.watchtower.enable=true"
depends_on:
girder:
condition: service_started
rabbit:
condition: service_started
version: "3.8"
services:
traefik:
image: traefik:v2.4
container_name: traefik
command: >
--providers.docker=true
--providers.docker.exposedByDefault=false
--entrypoints.web.address=:80
volumes:
- "${SOCK_PATH:-/var/run/docker.sock}:/var/run/docker.sock"
ports:
- "8010:80"
rabbit:
image: rabbitmq:3.8.14-management
ports:
- "5672:5672"
- "15672:15672"
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER:-guest}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS:-guest}
- RABBITMQ_DEFAULT_VHOST=${RABBITMQ_DEFAULT_VHOST:-default}
mongo:
image: mongo:5.0
volumes:
# Use env config path, default to docker volume
- ${MONGO_DB_PATH:-mongo_db}:/data/db
girder:
build:
context: .
dockerfile: docker/girder.Dockerfile
image: kitware/viame-web:${TAG:-latest}
init: true
command: ["--mode", "production"]
depends_on:
- mongo
- traefik
volumes:
- girder_assetstore:/home/assetstore
# Bind mount nocopy public data
- type: bind
source: ${PUBLIC_DATA_PATH:-./docker/girder_data}
target: /data/public
read_only: true
volume:
nocopy: true
environment:
- "GIRDER_MONGO_URI=mongodb://mongo:27017/girder"
- "GIRDER_ADMIN_USER=${GIRDER_ADMIN_USER:-admin}"
- "GIRDER_ADMIN_PASS=${GIRDER_ADMIN_PASS:-letmein}"
- "CELERY_BROKER_URL=${CELERY_BROKER_URL:-amqp://guest:guest@rabbit/default}"
- "WORKER_API_URL=${WORKER_API_URL:-http://girder:8080/api/v1}"
# Rabbitmq management variables
- "RABBITMQ_MANAGEMENT_USERNAME=${RABBITMQ_MANAGEMENT_USERNAME:-guest}"
- "RABBITMQ_MANAGEMENT_PASSWORD=${RABBITMQ_MANAGEMENT_PASSWORD:-guest}"
- "RABBITMQ_MANAGEMENT_VHOST=${RABBITMQ_MANAGEMENT_VHOST:-default}"
- "RABBITMQ_MANAGEMENT_URL=${RABBITMQ_MANAGEMENT_URL:-http://rabbit:15672/}"
- "RABBITMQ_MANAGEMENT_BROKER_URL_TEMPLATE=${RABBITMQ_MANAGEMENT_BROKER_URL_TEMPLATE}"
labels:
# REMOVING WEEKLY UPDATE
# - "com.centurylinklabs.watchtower.enable=true"
- "traefik.enable=true"
- "traefik.http.services.girder-svc.loadbalancer.server.port=8080"
- "traefik.http.routers.girder-rtr.entrypoints=web"
- "traefik.http.routers.girder-rtr.rule=HostRegexp(`{catchall:.*}`)"
# Worker for misc non gpu-bound tasks
girder_worker_default:
# Merge base-worker object with this config
<< : *base-worker
deploy: {}
volumes:
# readwrite because this worker does addon updates
- addons:/tmp/addons:rw
environment:
- "WORKER_WATCHING_QUEUES=celery"
- "WORKER_CONCURRENCY=${DEFAULT_WORKER_CONCURRENCY:-3}"
- "CELERY_BROKER_URL=${CELERY_BROKER_URL:-amqp://guest:guest@rabbit/default}"
girder_worker_pipelines:
# Merge base-worker object with this config
<< : *base-worker
environment:
- "WORKER_WATCHING_QUEUES=pipelines"
- "WORKER_CONCURRENCY=${PIPELINE_WORKER_CONCURRENCY:-1}"
- "WORKER_GPU_UUID=${PIPELINE_GPU_UUID}"
- "CELERY_BROKER_URL=${CELERY_BROKER_URL:-amqp://guest:guest@rabbit/default}"
girder_worker_training:
# Merge base-worker object with this config
<< : *base-worker
environment:
- "WORKER_WATCHING_QUEUES=training"
- "WORKER_CONCURRENCY=${TRAINING_WORKER_CONCURRENCY:-1}"
- "WORKER_GPU_UUID=${TRAINING_GPU_UUID}"
- "CELERY_BROKER_URL=${CELERY_BROKER_URL:-amqp://guest:guest@rabbit/default}"
volumes:
addons:
mongo_db:
girder_assetstore: