-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(wip) start working on 20.04 image and jenkins pipeline
- Loading branch information
1 parent
aa6ce37
commit 0ddc132
Showing
4 changed files
with
86 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,5 @@ | |
|
||
% Ignore python bytecode | ||
*.pyc | ||
|
||
*compile_commands.json |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,134 +1,84 @@ | ||
# Use an official Python runtime as a parent image | ||
FROM ubuntu:20.04 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
# To avoid tzdata asking for geographic location... | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Set the working directory to /root | ||
ENV DIRPATH /root/ | ||
WORKDIR $DIRPATH | ||
|
||
#Install build dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils | ||
RUN apt-get update && apt-get install -y git cmake build-essential pkg-config | ||
|
||
# Install xvfb to provide a display to container for GUI realted testing. | ||
RUN apt-get update && apt-get install -y xvfb | ||
|
||
# Install OpenCV for Ubuntu 20.04 | ||
RUN apt-get update && apt-get install -y \ | ||
unzip \ | ||
libjpeg-dev \ | ||
libpng-dev \ | ||
libtiff-dev \ | ||
libvtk7-dev \ | ||
libgtk-3-dev \ | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
build-essential \ | ||
cmake \ | ||
gfortran \ | ||
git \ | ||
libatlas-base-dev \ | ||
gfortran | ||
|
||
RUN git clone https://github.com/opencv/opencv.git | ||
RUN cd opencv && \ | ||
git checkout tags/3.4.2 && \ | ||
mkdir build | ||
|
||
RUN git clone https://github.com/opencv/opencv_contrib.git | ||
RUN cd opencv_contrib && \ | ||
git checkout tags/3.4.2 | ||
|
||
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 | ||
libboost-all-dev \ | ||
libeigen3-dev \ | ||
libgflags-dev \ | ||
libgoogle-glog-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/* | ||
|
||
# Install GTSAM | ||
RUN apt-get update && apt-get install -y libboost-all-dev libtbb-dev | ||
ADD https://api.github.com/repos/borglab/gtsam/git/refs/heads/develop version.json | ||
RUN git clone https://github.com/borglab/gtsam.git | ||
RUN cd gtsam && \ | ||
git fetch && \ | ||
git checkout e5866799dff48239573cdd84964180867e50edd2 && \ | ||
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 .. && \ | ||
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 \ | ||
.. && \ | ||
make -j$(nproc) install | ||
|
||
# Install Open_GV | ||
RUN git clone https://github.com/marcusabate/opengv | ||
RUN cd opengv && git apply march_native_disable.patch && \ | ||
mkdir build | ||
RUN cd opengv/build && \ | ||
cmake -DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=/usr/local \ | ||
-DEIGEN_INCLUDE_DIRS=$DIRPATH/gtsam/gtsam/3rdparty/Eigen \ | ||
-DEIGEN_INCLUDE_DIR=$DIRPATH/gtsam/gtsam/3rdparty/Eigen .. && \ | ||
make -j$(nproc) install | ||
RUN git clone https://github.com/marcusabate/opengv && \ | ||
cd opengv && \ | ||
git apply march_native_disable.patch && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake -DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX=/usr/local \ | ||
.. && \ | ||
make -j$(nproc) install | ||
|
||
# Install DBoW2 | ||
RUN git clone https://github.com/dorian3d/DBoW2.git | ||
RUN cd DBoW2 && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake .. && \ | ||
make -j$(nproc) install | ||
mkdir build && \ | ||
cd build && \ | ||
cmake .. && \ | ||
make -j$(nproc) install | ||
|
||
# Install RobustPGO | ||
ADD https://api.github.com/repos/MIT-SPARK/Kimera-RPGO/git/refs/heads/master version.json | ||
RUN git clone https://github.com/MIT-SPARK/Kimera-RPGO.git | ||
RUN cd Kimera-RPGO && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake .. && \ | ||
make -j$(nproc) | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y software-properties-common | ||
|
||
# Get python3 | ||
RUN apt-get update && \ | ||
apt-get install -y python3.8 python3.8-dev python3-pip python3-tk | ||
RUN apt-get update && \ | ||
apt-get install -y libgl1-mesa-glx | ||
RUN python3 $(which pip3) install --upgrade pip | ||
RUN python3 $(which pip3) install PyQt5 | ||
|
||
# Install evo-1 for evaluation | ||
# Hack to avoid Docker's cache when evo-1 fix/python3 branch is updated. | ||
RUN python3 $(which pip3) install open3d plotly --upgrade | ||
RUN python3 $(which pip3) install setuptools==58.3.0 | ||
ADD https://api.github.com/repos/MIT-SPARK/evo-1/git/refs/heads/fix/python3 version.json | ||
RUN git clone https://github.com/MIT-SPARK/evo-1.git | ||
RUN cd evo-1 && git checkout fix/python3 && python3.8 $(which pip3) install . | ||
|
||
# Install Kimera VIO Evaluation | ||
RUN python3 $(which pip3) install ipython prompt_toolkit | ||
# Hack to avoid Docker's cache when Kimera VIO Evaluation fix/python3 branch is updated. | ||
ADD https://api.github.com/repos/marcusabate/Kimera-VIO-Evaluation/git/refs/heads/fix/jenkins_tests/python3_lite version.json | ||
RUN git clone https://github.com/marcusabate/Kimera-VIO-Evaluation.git | ||
# We do the following because of a 20.04 issue with .egg-link file being in site-packages instead of dist-packages | ||
RUN rm -rf /usr/lib/python3.8/site-packages/ && \ | ||
ln -s /usr/local/lib/python3.8/dist-packages /usr/lib/python3.8/site-packages | ||
# We use `pip3 install -e .` so that Jinja2 has access to the webiste template... | ||
RUN cd Kimera-VIO-Evaluation && git fetch && git checkout fix/jenkins_tests/python3_lite && python3 $(which pip3) install -e . | ||
|
||
# Install glog, gflags | ||
RUN apt-get update && apt-get install -y libgflags2.2 libgflags-dev libgoogle-glog0v5 libgoogle-glog-dev | ||
|
||
# Install Pangolin | ||
RUN apt-get update && apt-get install -y libgl1-mesa-dev libglew-dev | ||
RUN git clone --depth 1 --branch v0.6 https://github.com/stevenlovegrove/Pangolin.git | ||
RUN cd Pangolin && \ | ||
mkdir build && \ | ||
cd build && \ | ||
cmake .. && \ | ||
make -j$(nproc) | ||
|
||
# Clean | ||
RUN apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
mkdir build && \ | ||
cd build && \ | ||
cmake .. && \ | ||
make -j$(nproc) install | ||
|
||
# Install Kimera-VIO-Evaluation | ||
RUN python3 -m pip install --upgrade pip | ||
ADD https://api.github.com/repos/marcusabate/Kimera-VIO-Evaluation/git/refs/heads/fix/python3 version.json | ||
RUN python3 -m pip install git+https://github.com/MIT-SPARK/Kimera-VIO-Evaluation.git@fix/python3 |
Oops, something went wrong.