-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
94 lines (85 loc) · 2.76 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
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
.PHONY: build-garage-headless-ros run-garage-headless-ros \
build-garage-nvidia-ros run-garage-nvidia-ros \
build-nvidia-sawyer-sim run-nvidia-sawyer-sim \
build-nvidia-sawyer-robot run-nvidia-sawyer-robot
# Path in host where the experiment data obtained in the container is stored
DATA_PATH ?= $(shell pwd)/data
# Set the environment variable MJKEY with the contents of the file specified by
# MJKEY_PATH.
MJKEY_PATH ?= ~/.mujoco/mjkey.txt
# Sets the add-host argument used to connect to the Sawyer ROS master
SAWYER_NET = "$(SAWYER_HOSTNAME):$(SAWYER_IP)"
ifneq (":", $(SAWYER_NET))
ADD_HOST=--add-host=$(SAWYER_NET)
endif
build-garage-headless-ros: docker/docker-compose-garage-headless-ros.yml
docker-compose -f docker/docker-compose-garage-headless-ros.yml build
build-garage-nvidia-ros: docker/docker-compose-garage-nvidia-ros.yml
docker-compose -f docker/docker-compose-garage-nvidia-ros.yml build
build-nvidia-sawyer-sim: docker/docker-compose-nv-sim.yml docker/get_intera.sh
docker/get_intera.sh --sim
docker-compose -f docker/docker-compose-nv-sim.yml build
build-nvidia-sawyer-robot: docker/docker-compose-nv-robot.yml docker/get_intera.sh
docker/get_intera.sh
docker-compose -f docker/docker-compose-nv-robot.yml build
run-garage-headless-ros: CONTAINER_NAME ?= garage-headless-ros
run-garage-headless-ros: build-garage-headless-ros
docker run \
--init \
-it \
--rm \
--net="host" \
$(ADD_HOST) \
-v $(DATA_PATH)/$(CONTAINER_NAME):/root/code/garage/data \
-e MJKEY="$$(cat $(MJKEY_PATH))" \
--name $(CONTAINER_NAME) \
$(ADD_ARGS) \
rlworkgroup/garage-headless-ros $(RUN_CMD)
run-garage-nvidia-ros: CONTAINER_NAME ?= garage-nvidia-ros
run-garage-nvidia-ros: build-garage-nvidia-ros
xhost +local:docker
docker run \
--init \
-it \
--rm \
--runtime=nvidia \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY="${DISPLAY}" \
-e QT_X11_NO_MITSHM=1 \
--net="host" \
$(ADD_HOST) \
-v $(DATA_PATH)/$(CONTAINER_NAME):/root/code/garage/data \
-e MJKEY="$$(cat $(MJKEY_PATH))" \
--name $(CONTAINER_NAME) \
$(ADD_ARGS) \
rlworkgroup/garage-nvidia-ros $(RUN_CMD)
run-nvidia-sawyer-sim: build-nvidia-sawyer-sim
xhost +local:docker
docker run \
--init \
-t \
--rm \
--runtime=nvidia \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY="${DISPLAY}" \
-e QT_X11_NO_MITSHM=1 \
--net="host" \
--name "sawyer-sim" \
gym-sawyer/nvidia-sawyer-sim
run-nvidia-sawyer-robot: build-nvidia-sawyer-robot
ifeq (,$(ADD_HOST))
$(error Set the environment variables SAWYER_HOST and SAWYER_IP)
endif
xhost +local:docker
docker run \
--init \
-t \
--rm \
--runtime=nvidia \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY="${DISPLAY}" \
-e QT_X11_NO_MITSHM=1 \
--net="host" \
$(ADD_HOST) \
--name "sawyer-robot" \
gym-sawyer/nvidia-sawyer-robot