gtsam/docker/ubuntu-gtsam/Dockerfile

36 lines
893 B
Docker
Raw Normal View History

2020-06-03 05:33:57 +08:00
# Ubuntu image with GTSAM installed. Configured with Boost and TBB support.
2018-10-29 05:34:41 +08:00
# Get the base Ubuntu image from Docker Hub
2021-09-07 04:14:23 +08:00
FROM borglab/ubuntu-boost-tbb:bionic
2018-10-29 05:34:41 +08:00
# Install git
RUN apt-get update && \
2018-10-29 05:34:41 +08:00
apt-get install -y git
# Install compiler
RUN apt-get install -y build-essential
2020-06-03 06:02:14 +08:00
# Clone GTSAM (develop branch)
2018-10-29 05:34:41 +08:00
WORKDIR /usr/src/
2020-06-03 06:02:14 +08:00
RUN git clone --single-branch --branch develop https://github.com/borglab/gtsam.git
2018-10-29 05:34:41 +08:00
2020-06-03 06:02:14 +08:00
# Change to build directory. Will be created automatically.
2018-10-29 05:34:41 +08:00
WORKDIR /usr/src/gtsam/build
2020-06-03 06:02:14 +08:00
# Run cmake
2018-10-29 05:34:41 +08:00
RUN cmake \
-DCMAKE_BUILD_TYPE=Release \
-DGTSAM_WITH_EIGEN_MKL=OFF \
-DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF \
-DGTSAM_BUILD_TIMING_ALWAYS=OFF \
-DGTSAM_BUILD_TESTS=OFF \
..
# Build
2020-06-03 05:33:57 +08:00
RUN make -j4 install && make clean
2018-10-29 05:34:41 +08:00
# Needed to link with GTSAM
RUN echo 'export LD_LIBRARY_PATH=/usr/local/lib:LD_LIBRARY_PATH' >> /root/.bashrc
2018-10-29 05:34:41 +08:00
# Run bash
CMD ["bash"]