-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (48 loc) · 1.53 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (48 loc) · 1.53 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
46
47
48
49
50
51
x-common: &trainer
build: .
image: dino-rl:latest
working_dir: /app
environment:
- DISPLAY=:99
- CHROME_URL=http://127.0.0.1:8080 # served by nginx in the same container
volumes:
- ./:/app
# (Optional) let you view the game in your host browser at http://localhost:18080
ports:
- "18080:8080"
services:
test:
<<: *trainer
command: >
python - <<'PY'
from envs.chrome_dino_env import ChromeDinoEnv
env = ChromeDinoEnv(input_backend="xdotool", auto_calibrate=True, termination_method="template",
template_thr=0.62)
obs,_ = env.reset()
print("obs stats:", obs.shape, float(obs.mean()), float(obs.std()))
for _ in range(20):
obs,r,d,tr,_ = env.step(1)
if d: break
env.close()
print("smoke ok")
PY
profiles: ["test"]
ppo_baseline:
<<: *trainer
command: >
python -m scripts.train_ppo
--config configs/ppo_baseline.yaml
--seeds 0 1 2
--total_timesteps 50000
--device cpu
--set experiment.debug_dump=true env.input_backend=xdotool env.auto_calibrate=true env.termination_method=template env.template_thr=0.62
profiles: ["ppo","all"]
dqn_baseline:
<<: *trainer
command: >
python -m scripts.train_dqn
--config configs/dqn_baseline.yaml
--seeds 0 1 2
--total_timesteps 50000
--set experiment.debug_dump=true env.input_backend=xdotool env.auto_calibrate=true env.termination_method=template env.template_thr=0.62
profiles: ["dqn","all"]