gtsam/docker/ubuntu-gtsam/Dockerfile

37 lines
845 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
2020-06-03 05:33:57 +08:00
FROM dellaert/ubuntu-boost-tbb:latest
2018-10-29 05:34:41 +08:00
# Install git
RUN apt-get update && \
apt-get install -y git
# Install compiler
RUN apt-get install -y build-essential
# Clone GTSAM
WORKDIR /usr/src/
RUN git clone https://bitbucket.org/gtborg/gtsam.git
2020-06-03 05:33:57 +08:00
RUN mkdir build
2018-10-29 05:34:41 +08:00
# Run cmake
WORKDIR /usr/src/gtsam/build
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 \
-DGTSAM_INSTALL_CYTHON_TOOLBOX=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
2020-06-03 05:33:57 +08:00
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"]