-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
44 lines (39 loc) · 942 Bytes
/
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
NAME=mppi_playground
VERSION=0.0.1
DOCKER_IMAGE_NAME=$(NAME):$(VERSION)
CONTAINER_NAME=$(NAME)
GPU_ID=all
build-gpu:
docker build -t $(DOCKER_IMAGE_NAME) -f docker/gpu/Dockerfile .
build-cpu:
docker build -t $(DOCKER_IMAGE_NAME) -f docker/cpu/Dockerfile .
bash-gpu:
xhost +local:docker && \
docker run -it \
--gpus '"device=${GPU_ID}"' \
-v ${PWD}/workspace \
-v ${PWD}:/workspace/$(NAME) \
--rm \
--shm-size 10G \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY \
-p 5900:5900 \
--name $(CONTAINER_NAME)-bash \
$(DOCKER_IMAGE_NAME) \
bash
bash-cpu:
xhost +local:docker && \
docker run -it \
-v ${PWD}/workspace \
-v ${PWD}:/workspace/$(NAME) \
--rm \
--shm-size 10G \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY \
-e LIBGL_ALWAYS_SOFTWARE=1 \
-p 5900:5900 \
--name $(CONTAINER_NAME)-bash \
$(DOCKER_IMAGE_NAME) \
bash
clear:
docker stop $(CONTAINER_NAME) && docker rm $(CONTAINER_NAME)