forked from entc17-fyp8/CenterPointMVP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (54 loc) · 1.72 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
#########################################################
# BUILD #
#########################################################
# Main image name
IMAGE_NAME = centerpointmvp_ros
# Build only the main image - centerpoint_ros
.PHONY: build
build:
docker build -f ./docker/dockerfile.centerpoint_mvp -t ${IMAGE_NAME} .
#########################################################
# RUN #
#########################################################
DOCKER_VOLUMES = \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--volume="/mnt/sda2/Batch17/Datasets/nuscenes_extracted/trainval_test:/workspace/CenterPoint/data/nuScenes":rw \
--volume="${PWD}/CenterPoint":"/workspace/CenterPoint":rw \
--volume="${PWD}/CenterNet2":"/workspace/CenterNet2":rw \
--volume="${PWD}/MVP":"/workspace/MVP":rw \
--volume="${PWD}/Checkpoints":"/workspace/Checkpoints":rw
DOCKER_ENV_VARS = \
--env="NVIDIA_DRIVER_CAPABILITIES=all" \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1"
DOCKER_ARGS = ${DOCKER_VOLUMES} ${DOCKER_ENV_VARS}
CONTAINER_NAME=${IMAGE_NAME}
# Run the Docker container
.PHONY: run
run:
@docker run --name=${CONTAINER_NAME} -it -d --net=host --gpus all --ipc=host \
${DOCKER_ARGS} ${IMAGE_NAME}
.PHONY: runit
runit:
@docker run --name=${CONTAINER_NAME} -it --net=host --gpus all --ipc=host \
${DOCKER_ARGS} ${IMAGE_NAME} bash
# Command to make GUI working (xhost +)
.PHONY: xhost
xhost:
@xhost +
# Start a terminal in existing Docker container
.PHONY: terminal
terminal:
@docker exec -it ${CONTAINER_NAME} bash
# Stop container
.PHONY: stop
stop:
@docker stop ${CONTAINER_NAME}
# Start a stopped container
.PHONY: start
start:
@docker start ${CONTAINER_NAME}
# Start a stopped container
.PHONY: clean
clean:
@docker rm ${CONTAINER_NAME}