forked from turlucode/ros-docker-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·220 lines (159 loc) · 13.5 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# If the first argument is ...
ifneq (,$(findstring tools_,$(firstword $(MAKECMDGOALS))))
# use the rest as arguments
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
#$(eval $(RUN_ARGS):;@:)
endif
.PHONY: help
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z_-]+:.*?## / {printf "\033[36m%-42s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help
# DOCKER TASKS
# NVIDIA
## INDIGO
nvidia_ros_indigo: ## [NVIDIA] Build ROS Indigo Container
docker build -t turlucode/ros-indigo:nvidia -f nvidia/indigo/base/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:nvidia\033[0m\n"
nvidia_ros_indigo_opencv3: nvidia_ros_indigo ## [NVIDIA] Build ROS Indigo Container | (----------------------) | OpenCV 3.4.7
docker build -t turlucode/ros-indigo:opencv3 -f nvidia/indigo/opencv3/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:opencv3\033[0m\n"
nvidia_ros_indigo_cuda8: nvidia_ros_indigo ## [NVIDIA] Build ROS Indigo Container | (CUDA 8 - no cuDNN)
docker build -t turlucode/ros-indigo:cuda8 -f nvidia/indigo/cuda8/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda8\033[0m\n"
nvidia_ros_indigo_cuda10: nvidia_ros_indigo ## [NVIDIA] Build ROS Indigo Container | (CUDA 10 - no cuDNN)
docker build -t turlucode/ros-indigo:cuda10 -f nvidia/indigo/cuda10/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda10\033[0m\n"
nvidia_ros_indigo_cuda10-1: nvidia_ros_indigo ## [NVIDIA] Build ROS Indigo Container | (CUDA 10.1 - no cuDNN)
docker build -t turlucode/ros-indigo:cuda10.1 -f nvidia/indigo/cuda10.1/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda10.1\033[0m\n"
nvidia_ros_indigo_cuda8_cudnn6: nvidia_ros_indigo_cuda8 ## [NVIDIA] Build ROS Indigo Container | (CUDA 8 - cuDNN 6)
docker build -t turlucode/ros-indigo:cuda8-cudnn6 -f nvidia/indigo/cuda8/cudnn6/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda8-cudnn6\033[0m\n"
nvidia_ros_indigo_cuda8_cudnn7: nvidia_ros_indigo_cuda8 ## [NVIDIA] Build ROS Indigo Container | (CUDA 8 - cuDNN 7)
docker build -t turlucode/ros-indigo:cuda8-cudnn7 -f nvidia/indigo/cuda8/cudnn7/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda8-cudnn7\033[0m\n"
nvidia_ros_indigo_cuda10_cudnn7: nvidia_ros_indigo_cuda10 ## [NVIDIA] Build ROS Indigo Container | (CUDA 10 - cuDNN 7)
docker build -t turlucode/ros-indigo:cuda10-cudnn7 -f nvidia/indigo/cuda10/cudnn7/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda10-cudnn7\033[0m\n"
nvidia_ros_indigo_cuda10-1_cudnn7: nvidia_ros_indigo_cuda10-1 ## [NVIDIA] Build ROS Indigo Container | (CUDA 10.1 - cuDNN 7)
docker build -t turlucode/ros-indigo:cuda10.1-cudnn7 -f nvidia/indigo/cuda10.1/cudnn7/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda10.1-cudnn7\033[0m\n"
nvidia_ros_indigo_cuda8_opencv3: nvidia_ros_indigo_cuda8 ## [NVIDIA] Build ROS Indigo Container | (CUDA 8 - no cuDNN) | OpenCV 3.4.7
docker build -t turlucode/ros-indigo:cuda8-opencv3 -f nvidia/indigo/cuda8/opencv3/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda8-opencv3\033[0m\n"
nvidia_ros_indigo_cuda10_opencv3: nvidia_ros_indigo_cuda10 ## [NVIDIA] Build ROS Indigo Container | (CUDA 10 - no cuDNN) | OpenCV 3.4.7
docker build -t turlucode/ros-indigo:cuda10-opencv3 -f nvidia/indigo/cuda10/opencv3/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda10-opencv3\033[0m\n"
nvidia_ros_indigo_cuda8_cudnn6_opencv3: nvidia_ros_indigo_cuda8_cudnn6 ## [NVIDIA] Build ROS Indigo Container | (CUDA 8 - cuDNN 6) | OpenCV 3.4.7
docker build -t turlucode/ros-indigo:cuda8-cudnn6-opencv3 -f nvidia/indigo/cuda8/cudnn6/opencv3/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda8-cudnn6-opencv3\033[0m\n"
nvidia_ros_indigo_cuda8_cudnn7_opencv3: nvidia_ros_indigo_cuda8_cudnn7 ## [NVIDIA] Build ROS Indigo Container | (CUDA 8 - cuDNN 7) | OpenCV 3.4.7
docker build -t turlucode/ros-indigo:cuda8-cudnn7-opencv3 -f nvidia/indigo/cuda8/cudnn7/opencv3/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda8-cudnn7-opencv3\033[0m\n"
nvidia_ros_indigo_cuda10_cudnn7_opencv3: nvidia_ros_indigo_cuda10_cudnn7 ## [NVIDIA] Build ROS Indigo Container | (CUDA 10 - cuDNN 7) | OpenCV 3.4.7
docker build -t turlucode/ros-indigo:cuda10-cudnn7-opencv3 -f nvidia/indigo/cuda10/cudnn7/opencv3/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda10-cudnn7-opencv3\033[0m\n"
nvidia_ros_indigo_cuda10-1_cudnn7_opencv3: nvidia_ros_indigo_cuda10-1_cudnn7 ## [NVIDIA] Build ROS Indigo Container | (CUDA 10.1 - cuDNN 7) | OpenCV 3.4.7
docker build -t turlucode/ros-indigo:cuda10.1-cudnn7-opencv3 -f nvidia/indigo/cuda10.1/cudnn7/opencv3/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cuda10.1-cudnn7-opencv3\033[0m\n"
## KINETIC
nvidia_ros_kinetic: ## [NVIDIA] Build ROS Kinetic Container
docker build -t turlucode/ros-kinetic:nvidia -f nvidia/kinetic/base/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-kinetic:nvidia\033[0m\n"
nvidia_ros_kinetic_opencv3: nvidia_ros_kinetic ## [NVIDIA] Build ROS Kinetic Container | (----------------------) | OpenCV 3.4.17
docker build -t turlucode/ros-kinetic:opencv3 -f nvidia/kinetic/opencv3/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-kinetic:opencv3\033[0m\n"
nvidia_ros_kinetic_cuda8: nvidia_ros_kinetic ## [NVIDIA] Build ROS Kinetic Container | (CUDA 8 - no cuDNN)
docker build -t turlucode/ros-kinetic:cuda8 -f nvidia/kinetic/cuda8/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-kinetic:cuda8\033[0m\n"
nvidia_ros_kinetic_cuda10: nvidia_ros_kinetic ## [NVIDIA] Build ROS Kinetic Container | (CUDA 10 - no cuDNN)
docker build -t turlucode/ros-kinetic:cuda10 -f nvidia/kinetic/cuda10/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-kinetic:cuda10\033[0m\n"
nvidia_ros_kinetic_cuda8_cudnn6: nvidia_ros_kinetic_cuda8 ## [NVIDIA] Build ROS Kinetic Container | (CUDA 8 - cuDNN 6)
docker build -t turlucode/ros-kinetic:cuda8-cudnn6 -f nvidia/kinetic/cuda8/cudnn6/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-kinetic:cuda8-cudnn6\033[0m\n"
nvidia_ros_kinetic_cuda10_cudnn7: nvidia_ros_kinetic_cuda10 ## [NVIDIA] Build ROS Kinetic Container | (CUDA 10 - cuDNN 7)
docker build -t turlucode/ros-kinetic:cuda10-cudnn7 -f nvidia/kinetic/cuda10/cudnn7/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-kinetic:cuda10-cudnn7\033[0m\n"
nvidia_ros_kinetic_cuda8_opencv3: nvidia_ros_kinetic_cuda8 ## [NVIDIA] Build ROS Kinetic Container | (CUDA 8 - no cuDNN) | OpenCV 3.4.17
docker build -t turlucode/ros-kinetic:cuda8-opencv3 -f nvidia/kinetic/opencv3/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-kinetic:cuda8-opencv3_latest\033[0m\n"
nvidia_ros_kinetic_cuda8_cudnn6_opencv3: nvidia_ros_kinetic_cuda8_cudnn6 ## [NVIDIA] Build ROS Kinetic Container | (CUDA 8 - cuDNN 6) | OpenCV 3.4.17
docker build -t turlucode/ros-kinetic:cuda8-cudnn6-opencv3 -f nvidia/kinetic/opencv3/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-kinetic:cuda8-cudnn6-opencv3\033[0m\n"
nvidia_ros_kinetic_cuda10_cudnn7_opencv3: nvidia_ros_kinetic_cuda10_cudnn7 ## [NVIDIA] Build ROS Kinetic Container | (CUDA 10 - cuDNN 7) | OpenCV 3.4.17
docker build -t turlucode/ros-kinetic:cuda10-cudnn7-opencv3 -f nvidia/kinetic/opencv3/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-kinetic:cuda10-cudnn7-opencv3\033[0m\n"
## MELODIC
nvidia_ros_melodic: ## [NVIDIA] Build ROS Melodic Container
docker build -t turlucode/ros-melodic:nvidia -f nvidia/melodic/base/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-melodic:nvidia\033[0m\n"
nvidia_ros_melodic_cuda10: nvidia_ros_melodic ## [NVIDIA] Build ROS Melodic Container | (CUDA 10 - no cuDNN)
docker build -t turlucode/ros-melodic:cuda10 -f nvidia/melodic/cuda10/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-melodic:cuda10\033[0m\n"
nvidia_ros_melodic_cuda10-1: nvidia_ros_melodic ## [NVIDIA] Build ROS Melodic Container | (CUDA 10.1 - no cuDNN)
docker build -t turlucode/ros-melodic:cuda10.1 -f nvidia/melodic/cuda10.1/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-melodic:cuda10.1\033[0m\n"
nvidia_ros_melodic_cuda10_cudnn7: nvidia_ros_melodic_cuda10 ## [NVIDIA] Build ROS Melodic Container | (CUDA 10 - cuDNN 7)
docker build -t turlucode/ros-melodic:cuda10-cudnn7 -f nvidia/melodic/cuda10/cudnn7/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-melodic:cuda10-cudnn7\033[0m\n"
nvidia_ros_melodic_cuda10-1_cudnn7: nvidia_ros_melodic_cuda10-1 ## [NVIDIA] Build ROS Melodic Container | (CUDA 10.1 - cuDNN 7)
docker build -t turlucode/ros-melodic:cuda10.1-cudnn7 -f nvidia/melodic/cuda10.1/cudnn7/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-melodic:cuda10.1-cudnn7\033[0m\n"
nvidia_ros_melodic_cuda11-4-2: nvidia_ros_melodic ## [NVIDIA] Build ROS Melodic Container | (CUDA 11.4.2 - no cuDNN)
docker build -t turlucode/ros-melodic:cuda11.4.2 -f nvidia/melodic/cuda11.4.2/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-melodic:cuda11.4.2\033[0m\n"
nvidia_ros_melodic_cuda11-4-2_cudnn8: nvidia_ros_melodic_cuda11-4-2 ## [NVIDIA] Build ROS Melodic Container | (CUDA 11.4.2 - cuDNN 8)
docker build -t turlucode/ros-melodic:cuda11.4.2-cudnn8 -f nvidia/melodic/cuda11.4.2/cudnn8/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-melodic:cuda11.4.2-cudnn8\033[0m\n"
## NOETIC
nvidia_ros_noetic: ## [NVIDIA] Build ROS Noetic Container
docker build -t turlucode/ros-noetic:nvidia -f nvidia/noetic/base/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-noetic:nvidia\033[0m\n"
nvidia_ros_noetic_cuda11-4-2: nvidia_ros_noetic ## [NVIDIA] Build ROS Noetic Container | (CUDA 11.4.2 - no cuDNN)
docker build -t turlucode/ros-noetic:cuda11.4.2 -f nvidia/noetic/cuda11.4.2/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-noetic:cuda11.4.2\033[0m\n"
nvidia_ros_noetic_cuda11-4-2_cudnn8: nvidia_ros_noetic_cuda11-4-2 ## [NVIDIA] Build ROS Noetic Container | (CUDA 11.4.2 - cuDNN 8)
docker build -t turlucode/ros-noetic:cuda11.4.2-cudnn8 -f nvidia/noetic/cuda11.4.2/cudnn8/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-noetic:cuda11.4.2-cudnn8\033[0m\n"
## BOUNCY
nvidia_ros_bouncy: ## [NVIDIA] Build ROS2 Bouncy Container
docker build -t turlucode/ros-bouncy:latest -f nvidia/bouncy/base/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-bouncy:latest\033[0m\n"
## Helper TASKS
nvidia_run_help: ## [NVIDIA] Prints help and hints on how to run an [NVIDIA]-based image
@printf "\n- Make sure the nvidia-docker-plugin (Test it with: docker run --rm --runtime=nvidia nvidia/cuda:9.0-base nvidia-smi)\n - Command example:\ndocker run --rm -it --runtime=nvidia --privileged --net=host --ipc=host \\ \n-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \\ \n-v $HOME/.Xauthority:/root/.Xauthority -e XAUTHORITY=/root/.Xauthority \\ \n-v <PATH_TO_YOUR_CATKIN_WS>:/root/catkin_ws \\ \n-e ROS_IP=<HOST_IP or HOSTNAME> \\ \nturlucode/ros-indigo:nvidia\n"
# CPU
## INDIGO
cpu_ros_indigo: ## [CPU] Build ROS Indigo Container
docker build -t turlucode/ros-indigo:cpu -f cpu/indigo/base/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-indigo:cpu\033[0m\n"
## KINETIC
cpu_ros_kinetic: ## [CPU] Build ROS Kinetic Container
docker build -t turlucode/ros-kinetic:cpu -f cpu/kinetic/base/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-kinetic:cpu\033[0m\n"
## MELODIC
cpu_ros_melodic: ## [CPU] Build ROS Melodic Container
docker build -t turlucode/ros-melodic:cpu -f cpu/melodic/base/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-melodic:cpu\033[0m\n"
## NOETIC
cpu_ros_noetic: ## [CPU] Build ROS Noetic Container
docker build -t turlucode/ros-noetic:cpu -f cpu/noetic/base/Dockerfile .
@printf "\n\033[92mDocker Image: turlucode/ros-noetic:cpu\033[0m\n"
## Helper TASKS
cpu_run_help: ## [CPU] Prints help and hints on how to run an [CPU]-based image
@printf "\nCommand example:\ndocker run --rm -it --runtime=nvidia --privileged --net=host --ipc=host \\ \n--device=/dev/dri:/dev/dri \\ \n-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY \\ \n-v $HOME/.Xauthority:/root/.Xauthority -e XAUTHORITY=/root/.Xauthority \\ \n-v <PATH_TO_YOUR_CATKIN_WS>:/root/catkin_ws \\ \n-e ROS_IP=<HOST_IP or HOSTNAME> \\ \nturlucode/ros-indigo:cpu\n"
# TOOLS
tools_vscode: ## [Tools] Create a new image that contains Visual Studio Code. Use it as "make tools_vscode <existing_docker_image>".
docker build --build-arg="ARG_FROM=$(RUN_ARGS)" -t $(RUN_ARGS)-vscode tools/vscode
@printf "\033[92mDocker Image: $(RUN_ARGS)-vscode\033[0m\n"
tools_canutils: ## [Tools] Create a new image that contains Canutils. Use it as "make tools_canutils <existing_docker_image>".
docker build --build-arg="ARG_FROM=$(RUN_ARGS)" -t $(RUN_ARGS)-canutils tools/canutils
@printf "\033[92mDocker Image: $(RUN_ARGS)-canutils\033[0m\n"
tools_cannelloni: ## [Tools] Create a new image that contains Cannelloni. Use it as "make tools_cannelloni <existing_docker_image>".
docker build --build-arg="ARG_FROM=$(RUN_ARGS)" -t $(RUN_ARGS)-cannelloni tools/cannelloni
@printf "\033[92mDocker Image: $(RUN_ARGS)-cannelloni\033[0m\n"
tools_cmake: ## [Tools] Create a new image that contains CMake. Use it as "make tools_cmake <existing_docker_image>".
docker build --build-arg="ARG_FROM=$(RUN_ARGS)" -t $(RUN_ARGS)-cmake tools/cmake
@printf "\033[92mDocker Image: $(RUN_ARGS)-cmake\033[0m\n"