-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yaml
191 lines (179 loc) · 4.46 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
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
181
182
183
184
185
186
187
188
189
190
191
version: "3.8"
services:
postgres:
image: postgres:15-alpine
env_file:
- morpheus-server/secrets.env
expose:
- 5432
ports:
- 5432:5432
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 5s
timeout: 5s
retries: 10
pgadmin:
image: dpage/pgadmin4
env_file:
- morpheus-server/secrets.env
ports:
- "8002:80"
depends_on:
postgres:
condition: service_healthy
api:
build:
context: morpheus-server
dockerfile: ./Dockerfile
args:
- TAG=${TAG:-latest}
image: morpheus-server:latest
env_file:
- morpheus-server/secrets.env
command: python3 main.py
volumes:
- ./morpheus-server:/opt/api
environment:
- NODE_ENV=development
ports:
- "8001:8001"
stdin_open: true
tty: true
depends_on:
postgres:
condition: service_healthy
datalib:
condition: service_completed_successfully
datalib:
build:
context: morpheus-data
dockerfile: ./Dockerfile
args:
DOCKER_BUILDKIT: 1
image: monadicalsas/morpheus-data:${TAG:-latest}
volumes:
- ./wheels:/wheels
- ./morpheus-data:/app
depends_on:
postgres:
condition: service_healthy
client:
build:
context: morpheus-client
dockerfile: ./Dockerfile
image: morpheus-client:latest
entrypoint: ./bin/entrypoint.sh
volumes:
- ./morpheus-client:/app
environment:
- NEXT_TELEMETRY_DISABLED=1
ports:
- "3000:3000"
stdin_open: true
tty: true
admin:
build:
context: morpheus-admin
dockerfile: ./Dockerfile
image: morpheus-admin:latest
entrypoint: ./bin/entrypoint.sh
volumes:
- ./morpheus-admin:/app
ports:
- "3001:3001"
stdin_open: true
tty: true
collaborative:
build:
context: morpheus-collaborative
dockerfile: ./Dockerfile
image: morpheus-collaborative:latest
entrypoint: ./bin/entrypoint.sh
volumes:
- ./morpheus-collaborative:/app
ports:
- "3002:3002"
stdin_open: true
tty: true
worker-ray:
build:
context: ./morpheus-worker
# If you are using a mac, uncomment the args below
# args:
# RAY_IMAGE_TAG: latest-gpu-aarch64
image: morpheus-worker:latest
env_file:
- morpheus-worker/secrets.env
command: bash start.sh
ports:
- "8000:8000"
- "8265:8265"
volumes:
- sd_model:/mnt/
depends_on:
api:
condition: service_started
healthcheck:
test: [ "CMD-SHELL", "ray status" ]
interval: 5s
timeout: 5s
retries: 10
# If you don't have a gpu, comment the deploy section below
deploy:
resources:
reservations:
devices:
- count: 1
capabilities: [ gpu ]
worker-ray-deployer:
image: morpheus-worker:latest
command: bash -c "sleep 10 && ray job submit -- serve deploy models.yaml"
environment:
- RAY_ADDRESS=http://worker-ray:8265
depends_on:
worker-ray:
condition: service_healthy
cloudflare-api:
image: cloudflare/cloudflared
profiles: [ "staging-old" ]
network_mode: 'service:api'
command: tunnel --url http://api:8001 run morpheus-staging-api-tunnel
depends_on:
- api
volumes:
- ./etc/cloudflare/api/config.yml:/home/nonroot/.cloudflared/config.yml
- ./etc/cloudflare/api/credentials.json:/home/nonroot/.cloudflared/credentials.json
cloudflare-client:
image: cloudflare/cloudflared
profiles: [ "staging-old" ]
network_mode: 'service:client'
command: tunnel --url http://client:3000 run morpheus-staging-client-tunnel
depends_on:
- client
volumes:
- ./etc/cloudflare/client/config.yml:/home/nonroot/.cloudflared/config.yml
- ./etc/cloudflare/client/credentials.json:/home/nonroot/.cloudflared/credentials.json
model-script:
build:
context: morpheus-server
dockerfile: ./scripts/models/Dockerfile
args:
- TAG=${TAG:-latest}
image: morpheus-script-model:latest
profiles: [ "manage" ]
env_file:
- morpheus-server/secrets.env
volumes:
- ./morpheus-server:/opt/api
stdin_open: true
tty: true
depends_on:
datalib:
condition: service_completed_successfully
volumes:
pg_data:
sd_model:
name: "models"