Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 40 additions & 41 deletions scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,52 @@ FROM ubuntu:20.04
LABEL maintainer="mabate@mit.edu"

# To avoid tzdata asking for geographic location...
ENV DEBIAN_FRONTEND=noninteractive

ENV DIRPATH /root/
WORKDIR $DIRPATH

RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN apt-get update && \
apt-get install -y \
build-essential \
cmake \
gfortran \
git \
libatlas-base-dev \
libboost-all-dev \
libeigen3-dev \
libgflags-dev \
libgoogle-glog-dev \
libmetis-dev \
libopencv-dev \
libopencv-contrib-dev \
libtbb-dev \
pkg-config \
xvfb \
python3 \
python3-dev \
python3-pip \
python3-tk && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/borglab/gtsam.git && \
cd gtsam && \
git checkout 4.2 && \
mkdir build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF \
-DGTSAM_BUILD_TESTS=OFF \
-DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DGTSAM_BUILD_UNSTABLE=ON \
-DGTSAM_POSE3_EXPMAP=ON \
-DGTSAM_ROT3_EXPMAP=ON \
-DGTSAM_TANGENT_PREINTEGRATION=OFF \
-DGTSAM_USE_SYSTEM_EIGEN=ON \
-DGTSAM_USE_SYSTEM_METIS=ON \
.. && \
RUN apt-get update && apt-get install -y git cmake

# Install xvfb to provide a display to container for GUI related testing.
RUN apt-get update && apt-get install -y xvfb

# Install GTSAM
RUN apt-get update && apt-get install -y libboost-all-dev libmetis-dev
ADD https://api.github.com/repos/borglab/gtsam/git/refs/heads/master version.json
RUN git clone https://github.com/borglab/gtsam.git
RUN cd gtsam && \
git fetch && \
mkdir build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DGTSAM_BUILD_TESTS=OFF -DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF -DCMAKE_BUILD_TYPE=Release -DGTSAM_BUILD_UNSTABLE=ON -DGTSAM_TANGENT_PREINTEGRATION=OFF .. && \
make -j$(nproc) install

# Install OpenCV for Ubuntu 18.04
RUN apt-get update && apt-get install -y \
build-essential cmake unzip pkg-config \
libjpeg-dev libpng-dev libtiff-dev \
libvtk6-dev \
libgtk-3-dev \
libatlas-base-dev gfortran

RUN git clone https://github.com/opencv/opencv.git
RUN cd opencv && \
git checkout tags/3.3.1 && \
mkdir build

RUN git clone https://github.com/opencv/opencv_contrib.git
RUN cd opencv_contrib && \
git checkout tags/3.3.1

RUN cd opencv/build && \
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-D BUILD_opencv_python=OFF \
-D BUILD_opencv_python2=OFF \
-D BUILD_opencv_python3=OFF \
-DOPENCV_EXTRA_MODULES_PATH=$DIRPATH/opencv_contrib/modules .. && \
make -j$(nproc) install

# Install Open_GV
Expand Down