-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
128 lines (99 loc) · 3.25 KB
/
Dockerfile
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
FROM manjarolinux/build:latest
# --- Dependencies ---
## Pacman
RUN pacman -Suy --noconfirm --needed \
go \
eigen \
boost \
assimp \
clang \
ninja \
curl \
glu \
&& rm -f /var/cache/pacman/pkg/*
## yay
RUN useradd builduser -m
RUN passwd -d builduser
RUN printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers
RUN sudo -u builduser bash -c 'cd ~ \
&& git clone https://aur.archlinux.org/yay.git \
&& cd yay && makepkg -si --noconfirm'
RUN sudo -u builduser bash -c 'yay -Syy --noconfirm octomap'
## Install Python 3.8
RUN sudo -u builduser bash -c 'yay -Syy --noconfirm python38'
## Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# --- Long Libary Builds ---
RUN mkdir collision-comparison
# Jolt
RUN cd collision-comparison \
&& git clone https://github.com/MaartenBehn/JoltPhysics.git \
&& cd JoltPhysics \
&& git checkout No-broadphase \
&& cd Build \
&& sh ./cmake_linux_clang_gcc.sh Distribution \
&& cd Linux_Distribution \
&& make -j 8
# Libccd
RUN cd collision-comparison \
&& git clone https://github.com/danfis/libccd.git \
&& cd libccd \
&& mkdir build && cd build \
&& cmake -G "Unix Makefiles" .. \
&& make
# Bullet
RUN cd collision-comparison \
&& git clone https://github.com/MaartenBehn/bullet3.git
# Fcl
RUN cd collision-comparison \
&& git clone https://github.com/MaartenBehn/hpp-fcl.git \
&& cd hpp-fcl \
&& git submodule update --init
# Compare-cpp dependecies
RUN cd collision-comparison \
&& git clone https://github.com/nlohmann/json.git \
&& git clone https://github.com/martinus/nanobench.git \
&& git clone https://github.com/g-truc/glm.git
# Setup venv
RUN cd collision-comparison \
&& python3.8 -m venv venv/ \
&& ./venv/bin/python3 -m pip install --upgrade pip
# distance3d
RUN cd collision-comparison \
&& git clone https://github.com/MaartenBehn/distance3d.git
# Install distance3d
RUN cd collision-comparison \
&& ./venv/bin/pip install -e ./distance3d
# Install Pybullet
RUN cd collision-comparison \
&& ./venv/bin/pip install pybullet
# collision-rs
RUN cd collision-comparison \
&& git clone https://github.com/MaartenBehn/collision-rs.git
# gjk-rs
RUN cd collision-comparison \
&& git clone https://github.com/MaartenBehn/gjk-rs.git
# --- Copy folders ---
ADD results collision-comparison/results
ADD scripts collision-comparison/scripts
ADD data collision-comparison/data
# --- Compare-cpp ---
ADD compare-cpp collision-comparison/compare-cpp
RUN rm -rf collision-comparison/compare-cpp/build_release
RUN cd collision-comparison/compare-cpp \
&& mkdir build_release/
RUN cd collision-comparison/ \
&& sh scripts/compile/compile_compare_release.sh
# --- Compare-Python ---
ADD compare-python collision-comparison/compare-python
ENV PYTHONPATH="${PYTHONPATH}:collision-comparison/compare-python"
# Run python benchmark once
RUN cd collision-comparison \
&& sh scripts/benchmarks/benchmark_python.sh
# --- Compare-rs ---
ADD compare-rs collision-comparison/compare-rs
RUN rm -rf collision-comparison/compare-rs/target
# Run rust benchmark once
RUN cd collision-comparison \
&& source "$HOME/.cargo/env" \
&& sh scripts/benchmarks/benchmark_rust.sh