forked from sensiml/piccolo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
180 lines (178 loc) · 5.4 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
services:
db:
mem_limit: "250M"
image: postgres
environment:
- POSTGRES_DB=piccolodb
- POSTGRES_USER=piccoloadmin
- POSTGRES_PASSWORD=piccoloadmin3
ports:
- "5432:5432"
redis:
mem_limit: "250M"
image: redis
helper:
image: sensiml/base
command: sh -c "chown -R sml-app:sml-app /home/sml-app/install/lib/; chown -R sml-app:sml-app /home/sml-app/data/"
volumes:
- server_data:/home/sml-app/data/
- server_libs:/home/sml-app/install/lib/
sensiml.databse.initalize:
mem_limit: "2000M"
image: sensiml/base
working_dir: /home/sml-app/install/
user: sml-app
volumes:
- server_data:/home/sml-app/data/
- server_libs:/home/sml-app/install/lib/
- type: bind
source: ./src/server/
target: /home/sml-app/install/server/
- type: bind
source: ./src/embedded_ml_sdk/
target: /home/sml-app/install/embedded_ml_sdk/
- type: bind
source: ./scripts/
target: /home/sml-app/install/scripts/
- type: bind
source: ./src/server/config/
target: /home/sml-app/install/config/
environment:
- DJANGO_ENV=docker
- DJANGO_ENV_PATH=/home/sml-app/install/config/env
- HOMEDIR=/home/sml-app/install/
command: /bin/bash scripts/setup.sh
depends_on:
- db
- redis
- helper
sensiml.cloud:
user: sml-app
mem_limit: "2000M"
image: sensiml/base
working_dir: /home/sml-app/install/server/
volumes:
- server_data:/home/sml-app/data/
- server_libs:/home/sml-app/install/lib/
- type: bind
source: ./src/server/
target: /home/sml-app/install/server/
- type: bind
source: ./src/embedded_ml_sdk/
target: /home/sml-app/install/embedded_ml_sdk/
- type: bind
source: ./src/server/config/
target: /home/sml-app/install/config/
environment:
- DJANGO_ENV=docker
- DJANGO_ENV_PATH=/home/sml-app/install/config/env
- DJANGO_DEBUGGER=True
- PORT_PTVSD=8005
command: python manage.py runserver 0.0.0.0:8000 --noreload
ports:
- "8000:8000"
depends_on:
- db
- redis
- sensiml.databse.initalize
sensiml.pipelines:
mem_limit: "2000M"
image: sensiml/base
working_dir: /home/sml-app/install/server/
user: sml-app
volumes:
- server_data:/home/sml-app/data/
- server_libs:/home/sml-app/install/lib/
- type: bind
source: ./src/server/
target: /home/sml-app/install/server/
- type: bind
source: ./src/embedded_ml_sdk
target: /home/sml-app/install/embedded_ml_sdk/
- type: bind
source: ./src/server/config/
target: /home/sml-app/install/config/
- type: bind
source: //var/run/docker.sock
target: /var/run/docker.sock
environment:
- DJANGO_ENV=docker
- DJANGO_DEBUGGER=True
- PORT_PTVSD=6902
- CELERY_RDB_PORT=6900
- CELERY_RDB_HOST=0.0.0.0
- DJANGO_ENV_PATH=/home/sml-app/install/config/env
- DOCKER_HOST_SML_DATA_DIR=${DOCKER_HOST_SML_DATA_DIR}
command: bash -c "sudo chown sml-app:sml-app /var/run/docker.sock && celery --app=server.celery:app worker --loglevel=INFO -O fair --without-mingle --without-gossip --concurrency 1 -Q pipelines,file_upload,knowledgepack -n pipelines"
depends_on:
- db
- redis
- sensiml.databse.initalize
sensiml.steps:
mem_limit: "2000M"
image: sensiml/base
working_dir: /home/sml-app/install/server/
user: sml-app
deploy:
mode: replicated
replicas: 2
volumes:
- server_data:/home/sml-app/data/
- server_libs:/home/sml-app/install/lib/
- type: bind
source: ./src/server/
target: /home/sml-app/install/server/
- type: bind
source: ./src/embedded_ml_sdk/
target: /home/sml-app/install/embedded_ml_sdk/
- type: bind
source: ./src/server/config/
target: /home/sml-app/install/config/
environment:
- DJANGO_ENV=docker
- CELERY_RDB_PORT=6950
- CELERY_RDB_HOST=0.0.0.0
- DJANGO_ENV_PATH=/home/sml-app/install/config/env
command: celery --app=server.celery:app worker --loglevel=INFO -O fair --without-mingle --without-gossip --concurrency 1 -Q pipeline_steps -n steps
depends_on:
- db
- redis
- sensiml.databse.initalize
volumes:
server_data:
server_libs:
# attach to container and enter shell
#
# docker exec -it <container-id> /bin/bash
#
# Uncomment if you would like celery frower to start as well
#
# flower:
# image: sensiml/base
# working_dir: /home/sml-app/install/server/
# volumes:
# - type: bind
# source: ${SML_SERVER_DATADIR}
# target: /home/sml-app/data/
# - type: bind
# source: ./server/
# target: /home/sml-app/install/server/
# - type: bind
# source: ./config/
# target: /home/sml-app/install/config/
# - type: bind
# source: ./embedded_ml_sdk/
# target: /home/sml-app/install/embedded_ml_sdk/
# - type: bind
# source: ${SML_SERVER_DATADIR}/lib/
# target: /home/sml-app/install/lib/
# environment:
# - DJANGO_ENV=docker
# - DJANGO_ENV_PATH=/home/sml-app/install/config/env
# command: celery flower --broker=redis://localhost:6379
# ports:
# - "5555:5555"
# depends_on:
# - db
# - redis
# - sensiml.databse.initalize