2020-06-03 05:33:57 +08:00
|
|
|
# GTSAM Ubuntu image with Python wrapper support.
|
|
|
|
|
2018-10-29 05:34:41 +08:00
|
|
|
# Get the base Ubuntu/GTSAM image from Docker Hub
|
2021-09-07 04:14:23 +08:00
|
|
|
FROM borglab/ubuntu-gtsam:bionic
|
2018-10-29 05:34:41 +08:00
|
|
|
|
|
|
|
# Install pip
|
2020-06-03 05:33:57 +08:00
|
|
|
RUN apt-get install -y python3-pip python3-dev
|
2018-10-29 05:34:41 +08:00
|
|
|
|
2020-10-02 07:56:35 +08:00
|
|
|
# Run cmake again, now with python toolbox on
|
2018-10-29 05:34:41 +08:00
|
|
|
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 \
|
2020-10-02 07:56:35 +08:00
|
|
|
-DGTSAM_BUILD_PYTHON=ON \
|
2020-06-03 05:33:57 +08:00
|
|
|
-DGTSAM_PYTHON_VERSION=3\
|
2018-10-29 05:34:41 +08:00
|
|
|
..
|
|
|
|
|
|
|
|
# Build again, as ubuntu-gtsam image cleaned
|
2021-09-07 04:14:23 +08:00
|
|
|
RUN make -j4 install
|
|
|
|
RUN make python-install
|
|
|
|
RUN make clean
|
2018-10-29 05:34:41 +08:00
|
|
|
|
|
|
|
# Needed to run python wrapper:
|
2020-10-02 07:56:35 +08:00
|
|
|
RUN echo 'export PYTHONPATH=/usr/local/python/:$PYTHONPATH' >> /root/.bashrc
|
2018-10-29 05:34:41 +08:00
|
|
|
|
|
|
|
# Run bash
|
|
|
|
CMD ["bash"]
|