-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
92 lines (84 loc) · 2.7 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
version: "3"
services:
#################### job manager #######################
mongo:
image: mongo:4.4
restart: always
container_name: "mongodb"
working_dir: "/database/"
environment:
MONGO_INITDB_ROOT_USERNAME: '${MONGO_DB_USERNAME}'
MONGO_INITDB_ROOT_PASSWORD: '${MONGO_DB_PASSWORD}'
volumes:
- "${PWD}/database/:/data/db"
- ./mongo_import.sh:/docker-entrypoint-initdb.d/mongo_import.sh
- "${PWD}/data/dump:/dump"
job-service:
image: mlexchange1/computing_api_job-service:1.1
restart: 'unless-stopped'
container_name: 'job-service'
command: 'python api/main.py'
environment:
MONGO_INITDB_ROOT_USERNAME: '${MONGO_DB_USERNAME}'
MONGO_INITDB_ROOT_PASSWORD: '${MONGO_DB_PASSWORD}'
depends_on:
- 'mongo'
ports:
- '8080:8080'
worker-launcher:
image: mlexchange1/computing_api_worker-launcher:2.1
restart: 'unless-stopped'
container_name: 'worker-launcher'
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "../data/dump:/data/mongo/dump"
command: >
sh -c "
sleep 20 &&
python3 src/worker_launcher.py"
environment:
NUM_PROCESSORS: 2
NETWORK: 'computing_api_default'
HOST: '{"nickname":"local",
"hostname":"local.als.lbl.gov",
"frontend_constraints": {"num_processors":10, "num_gpus":0, "list_gpus":[], "num_nodes":2},
"backend_constraints":{"num_processors":10, "num_gpus":0, "list_gpus":[], "num_nodes":2}}'
WORKER_IMAGE: 'mlexchange1/dummy-worker:1.1'
depends_on:
- 'job-service'
front-end:
image: mlexchange1/computing_api_front-end:1.0
restart: "unless-stopped"
container_name: "comp-frontend"
command: "python frontend.py"
ports:
- "8050:8050"
depends_on:
- 'job-service'
#################### content registry ######################
content-api:
image: mlexchange1/content-api:1.2
restart: "unless-stopped"
container_name: "content-api"
environment:
MONGO_INITDB_ROOT_USERNAME: '${MONGO_DB_USERNAME}'
MONGO_INITDB_ROOT_PASSWORD: '${MONGO_DB_PASSWORD}'
ports:
- "8000:8000"
depends_on:
- "mongo"
content-registry:
image: mlexchange1/content-registry:1.4
restart: "unless-stopped"
container_name: "content-registry"
environment:
MONGO_INITDB_ROOT_USERNAME: '${MONGO_DB_USERNAME}'
MONGO_INITDB_ROOT_PASSWORD: '${MONGO_DB_PASSWORD}'
CONTAINER_WORKING_DIR: '${PWD}/data'
ports:
- "8051:8051"
depends_on:
- content-api
networks:
default:
name: "computing_api_default"