-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
45 lines (42 loc) · 1.03 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
45 lines (42 loc) · 1.03 KB
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
version: "3"
services:
ray-head:
image: ${RAY_IMAGE}
ports:
- "${REDISPORT}:${REDISPORT}"
- "${DASHBOARDPORT}:${DASHBOARDPORT}"
- "${HEADNODEPORT}:${HEADNODEPORT}"
env_file:
- .env
command: bash -c "ray start --head --dashboard-port=${DASHBOARDPORT} --port=${REDISPORT} --dashboard-host=0.0.0.0 --redis-password=${REDISPASSWORD} --block"
shm_size: 2g
deploy:
resources:
limits:
cpus: '1'
memory: '2g'
networks:
- ray_net
ray-worker:
image: ${RAY_IMAGE}
depends_on:
- ray-head
env_file:
- .env
command: bash -c "ray start --address=ray-head:${REDISPORT} --redis-password=${REDISPASSWORD} --num-cpus=${NUM_CPU_WORKER} --block"
shm_size: 2g
deploy:
mode: replicated
replicas: ${NUM_WORKERS}
resources:
limits:
cpus: ${NUM_CPU_WORKER}
memory: '2g'
networks:
- ray_net
networks:
ray_net:
ipam:
driver: default
config:
- subnet: 172.63.0.0/16