-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile
54 lines (43 loc) · 1.6 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
FROM gcc:8 AS deps_stage
LABEL maintainer="Chris Chan"
# install cmake
RUN wget https://github.com/Kitware/CMake/releases/download/v3.18.2/cmake-3.18.2-Linux-x86_64.sh \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /usr/bin/cmake \
&& /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake \
&& rm /tmp/cmake-install.sh
ENV PATH="/usr/bin/cmake/bin:${PATH}"
# deps
RUN apt-get update &&\
apt-get install -y --no-install-recommends \
libboost-all-dev\
libopencv-dev\
python3-opencv\
libeigen3-dev\
cppad\
gnuplot &&\
apt-get clean
# ipopt
COPY install_ipopt.sh /
RUN wget https://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.7.zip &&\
unzip Ipopt-3.12.7.zip && rm Ipopt-3.12.7.zip
RUN bash install_ipopt.sh /Ipopt-3.12.7
# ceres
RUN apt-get install -y libgoogle-glog-dev libgflags-dev libatlas-base-dev libsuitesparse-dev
RUN wget http://ceres-solver.org/ceres-solver-2.0.0.tar.gz
RUN tar zxf ceres-solver-2.0.0.tar.gz
RUN mkdir ceres-bin
RUN cd ceres-bin && cmake ../ceres-solver-2.0.0 && make -j3 && make install
# ompl
RUN git clone https://github.com/ompl/ompl.git
RUN cd ompl && mkdir -p build/Release && cd build/Release \
&& cmake ../.. && make install -j 4
FROM deps_stage AS build_stage
COPY CMakeLists.txt /root/LearnRoboticsCpp/CMakeLists.txt
COPY src /root/LearnRoboticsCpp/src
COPY include /root/LearnRoboticsCpp/include
COPY examples /root/LearnRoboticsCpp/examples
WORKDIR /root/LearnRoboticsCpp
RUN mkdir build && cd build && cmake .. && make -j 4
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib