This repository has been archived by the owner on Dec 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
97 lines (82 loc) · 2.05 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
version: "3"
services:
mosquitto:
image: eclipse-mosquitto
hostname: mosquitto
container_name: mosquitto
networks:
- default
expose:
- "1883"
- "9001"
ports:
- "1883:1883"
- "9001:9001"
environment:
build: .
hostname: environment
container_name: environment
command: ["python3", "scripts/environment_service.py"]
volumes:
- ./models:/models
restart: unless-stopped
networks:
- default
environment:
- MQTT_HOST_ADDRESS=mosquitto
- MQTT_HOST_PORT=1883
- MQTT_P1_TOPIC=/p1
- MQTT_P2_TOPIC=/p2
- MQTT_ENV_TOPIC=/env
trainer:
build: .
hostname: trainer
container_name: trainer
command: ["jupyter", "notebook", "--port=8888", "--ip=0.0.0.0", "--no-browser", "--allow-root"]
volumes:
- ./models:/models
restart: unless-stopped
networks:
- default
expose:
- "8888"
ports:
- "8888:8888"
agent1:
build: .
hostname: agent1
container_name: agent1
command: ["python3", "scripts/dqn_agent_service.py"]
volumes:
- ./models:/models
restart: unless-stopped
networks:
- default
environment:
- MQTT_HOST_ADDRESS=mosquitto
- MQTT_HOST_PORT=1883
- MQTT_P1_TOPIC=/p1
- MQTT_P2_TOPIC=/p2
- MQTT_ENV_TOPIC=/env
- MODEL_FILENAME=/data/models/agent.pkl
- PLAYER=1
agent2:
build: .
hostname: agent2
container_name: agent2
command: ["python3", "scripts/dqn_agent_service.py"] # TODO: load model through env var?
volumes:
- ./models:/models
restart: unless-stopped
networks:
- default
environment:
- MQTT_HOST_ADDRESS=mosquitto
- MQTT_HOST_PORT=1883
- MQTT_P1_TOPIC=/p1
- MQTT_P2_TOPIC=/p2
- MQTT_ENV_TOPIC=/env
- MODEL_FILENAME=/data/models/agent.pkl
- PLAYER=2
networks:
default: