-
Notifications
You must be signed in to change notification settings - Fork 468
/
Makefile
110 lines (93 loc) · 2.88 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
cleanpip:
rm -rf *.egg-info
rm -rf build
clean_terrain:
rm -rf infinigen/terrain/*.egg-info
rm -rf infinigen/terrain/__pycache__
rm -rf infinigen/terrain/build
terrain: clean_terrain
bash scripts/install/compile_terrain.sh
customgt:
bash scripts/install/compile_opengl.sh
flip_fluids:
bash scripts/install/compile_flip_fluids.sh
DOCKER_BUILD_PROGRESS ?= auto
DOCKER_TAG ?= infinigen_docker_img
PWD = $(shell pwd)
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
default:
docker-build:
docker build \
--tag $(DOCKER_TAG) \
--progress $(DOCKER_BUILD_PROGRESS) .
docker-build-cuda:
docker build \
--tag $(DOCKER_TAG) \
--progress $(DOCKER_BUILD_PROGRESS) \
--build-arg APP_IMAGE=nvidia/cuda:12.0.0-devel-ubuntu22.04 .
docker-clean:
echo "Removing infinigen docker image if already exists..."
-docker rmi -f $(DOCKER_TAG)
docker-setup:
sudo apt-get install x11-xserver-utils \
&& touch ~/.Xauthority \
&& xauth add $(HOST):0 . $(shell xxd -l 16 -p /dev/urandom) \
&& touch "$(XAUTH)" \
&& xauth nlist "$(DISPLAY)" | sed -e 's/^..../ffff/' | xauth -f "$(XAUTH)" nmerge - \
&& xhost +local:docker
docker-run:
docker run -td --privileged --net=host --ipc=host \
--name="infinigen" \
--gpus=all \
--env NVIDIA_DISABLE_REQUIRE=1 \
-e "DISPLAY=$(DISPLAY)" \
-e "QT_X11_NO_MITSHM=1" \
-v "/tmp/.X11-unix:/tmp/.X11-unix:rw" \
-v $(PWD)/outputs:/opt/infinigen/outputs \
-e "XAUTHORITY=$(XAUTH)" \
-e ROS_IP=127.0.0.1 \
--cap-add=SYS_PTRACE \
-v /etc/group:/etc/group:ro \
"$(DOCKER_TAG)" /bin/bash \
|| docker run -td --privileged --net=host --ipc=host \
--name="infinigen" \
--device /dev/dri \
-e "DISPLAY=$(DISPLAY)" \
-e "QT_X11_NO_MITSHM=1" \
-v "/tmp/.X11-unix:/tmp/.X11-unix:rw" \
-v $(PWD)/outputs:/opt/infinigen/outputs \
-e "XAUTHORITY=$(XAUTH)" \
-e ROS_IP=127.0.0.1 \
--cap-add=SYS_PTRACE \
-v /etc/group:/etc/group:ro \
"$(DOCKER_TAG)" bash
docker-run-no-opengl:
echo "Launching Docker image without OpenGL ground truth"
docker run -td --rm --privileged --net=host --ipc=host \
--name="infinigen" \
--gpus=all \
--env NVIDIA_DISABLE_REQUIRE=1 \
-v $(PWD)/outputs:/opt/infinigen/outputs \
"$(DOCKER_TAG)" /bin/bash
docker-run-no-gpu:
echo "Launching Docker image without GPU passthrough"
docker run -td --privileged --net=host --ipc=host \
--name="infinigen" \
-e "DISPLAY=$(DISPLAY)" \
-e "QT_X11_NO_MITSHM=1" \
-v "/tmp/.X11-unix:/tmp/.X11-unix:rw" \
-v $(PWD)/outputs:/opt/infinigen/outputs \
-e "XAUTHORITY=$(XAUTH)" \
-e ROS_IP=127.0.0.1 \
--cap-add=SYS_PTRACE \
-v /etc/group:/etc/group:ro \
"$(DOCKER_TAG)" /bin/bash \
]
docker-run-no-gpu-opengl:
echo "Launching Docker image without GPU passthrough or OpenGL"
docker run -td --rm --privileged --net=host --ipc=host \
--name="infinigen" \
-e "BLENDER=/opt/infinigen/blender/blender" \
-v $(PWD)/outputs:/opt/infinigen/outputs \
"$(DOCKER_TAG)" /bin/bash