-
Notifications
You must be signed in to change notification settings - Fork 55
/
Dockerfile
executable file
·71 lines (60 loc) · 2.52 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
FROM ubuntu:20.04 as prod
ENV DEBIAN_FRONTEND noninteractive
RUN apt update && apt install -y --no-install-recommends apt-utils && \
apt upgrade -y && apt autoremove -y && \
apt install -y build-essential cmake && \
apt install -y python-is-python3 python3-pip && \
rm -rf /var/lib/apt/lists/*
# suppress GTK warnings about accessibility because there's no dbus
# (WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-dw0fOAy4vj: Connection refused)
ENV NO_AT_BRIDGE 1
WORKDIR /home
#------------------------------ #
# INSTALL OPENCV 4 #
#------------------------------ #
RUN apt update && apt install -y libopencv-dev && \
rm -rf /var/lib/apt/lists/*
#------------------------------ #
# INSTALL Boost #
#------------------------------ #
RUN apt update && apt install -y libboost-all-dev && \
rm -rf /var/lib/apt/lists/*
#------------------------------ #
# Install Ceres #
#------------------------------ #
RUN apt update && \
apt install -y libgoogle-glog-dev libgflags-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev && \
rm -rf /var/lib/apt/lists/*
RUN apt update && apt install -y git && \
/bin/bash -c "git clone https://ceres-solver.googlesource.com/ceres-solver && \
cd ceres-solver && mkdir build && cd build && cmake .. && \
make && make install && \
cd /home && rm -rf ceres-solver" && \
rm -rf /var/lib/apt/lists/*
# Install python requirements for python_utils scripts
RUN --mount=type=bind,source=python_utils/requirements_prod.txt,target=/tmp/requirements.txt \
pip install --requirement /tmp/requirements.txt && \
rm -rf /var/lib/apt/lists/*
FROM prod as dev
RUN apt update && apt install -y python3-opencv && \
rm -rf /var/lib/apt/lists/*
#------------------------------ #
# Doxygen #
#------------------------------ #
RUN apt update && apt install -y flex bison && \
/bin/bash -c "git clone https://github.com/doxygen/doxygen.git && \
cd doxygen && mkdir build && cd build &&\
cmake -G 'Unix Makefiles' .. && \
make && \
make install && \
cd /home && rm -rf doxygen" && \
rm -rf /var/lib/apt/lists/*
#------------------------------ #
# For development #
#------------------------------ #
RUN apt update && apt install -y cppcheck clang-tidy valgrind lcov && \
rm -rf /var/lib/apt/lists/*
# Install python requirements for python_utils scripts
RUN --mount=type=bind,source=python_utils/requirements_dev.txt,target=/tmp/requirements.txt \
pip install --requirement /tmp/requirements.txt && \
rm -rf /var/lib/apt/lists/*