This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (48 loc) · 1.58 KB
/
Makefile
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
# PYTHON_BIN := /usr/local/opt/python@3.9/bin/python3
# SIMULATOR_HOST := localhost
PYTHON_BIN := python3.9
SIMULATOR_HOST := 192.168.1.211
LOG_SOCKET_URL := $(SIMULATOR_HOST):11001
CAR_SOCKET_URL := $(SIMULATOR_HOST):11000
REDIS_SOCKET := /tmp/robotini-ddpg.redis.sock
CACHE_DIR := ./tf-data
MONITORED_TEAM_IDS := env{1..7}
CONFIG_PATH := ./scripts/config.yml
SAVED_POLICY_DIR := tmp-policy
TF_CPP_MIN_LOG_LEVEL := 1
export TF_CPP_MIN_LOG_LEVEL PYTHON_BIN REDIS_SOCKET
.PHONY: clean start_monitor env_demo train_ddpg start_tensorboard
clean:
rm -rv $(CACHE_DIR)
start_redis:
redis-server \
--unixsocket $(REDIS_SOCKET) \
--save "" \
--maxmemory 32mb \
--port 0
train_ddpg:
$(PYTHON_BIN) scripts/train_ddpg.py \
--car-socket-url $(CAR_SOCKET_URL) \
--log-socket-url $(LOG_SOCKET_URL) \
--redis-socket-path $(REDIS_SOCKET) \
--config-path $(CONFIG_PATH) \
--cache-dir $(CACHE_DIR)
start_monitor:
$(PYTHON_BIN) robotini_ddpg/monitor/webapp.py $(REDIS_SOCKET) $(MONITORED_TEAM_IDS)
start_tensorboard:
tensorboard --logdir $(CACHE_DIR)
run_trained_policy:
$(PYTHON_BIN) scripts/run_trained_policy.py \
--car-socket-url $(CAR_SOCKET_URL) \
--log-socket-url $(LOG_SOCKET_URL) \
--redis-socket-path $(REDIS_SOCKET) \
--config-path $(CONFIG_PATH) \
--policy-dir $(SAVED_POLICY_DIR)
run_debug_policy:
$(PYTHON_BIN) scripts/env_demo.py \
--car-socket-url $(CAR_SOCKET_URL) \
--log-socket-url $(LOG_SOCKET_URL) \
--redis-socket-path $(REDIS_SOCKET) \
--config-path $(CONFIG_PATH)
readme:
@$(PYTHON_BIN) -c 'from mistune import html;print(html(open("README.md").read()))'