improve and modernize the Dockerfiles
parent
d0bd3d8715
commit
92634d1525
|
@ -1,11 +1,16 @@
|
||||||
|
# Basic Ubuntu 18.04 image with Boost and TBB installed. To be used for building further downstream packages.
|
||||||
|
|
||||||
# Get the base Ubuntu image from Docker Hub
|
# Get the base Ubuntu image from Docker Hub
|
||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
|
|
||||||
|
# Disable GUI prompts
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
# Update apps on the base image
|
# Update apps on the base image
|
||||||
RUN apt-get -y update && apt install -y
|
RUN apt-get -y update && apt-get -y install
|
||||||
|
|
||||||
# Install C++
|
# Install C++
|
||||||
RUN apt-get -y install build-essential
|
RUN apt-get -y install build-essential apt-utils
|
||||||
|
|
||||||
# Install boost and cmake
|
# Install boost and cmake
|
||||||
RUN apt-get -y install libboost-all-dev cmake
|
RUN apt-get -y install libboost-all-dev cmake
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
|
# This GTSAM image connects to the host X-server via VNC to provide a Graphical User Interface for interaction.
|
||||||
|
|
||||||
# Get the base Ubuntu/GTSAM image from Docker Hub
|
# Get the base Ubuntu/GTSAM image from Docker Hub
|
||||||
FROM dellaert/ubuntu-gtsam-python:bionic
|
FROM dellaert/ubuntu-gtsam-python:bionic
|
||||||
|
|
||||||
# Things needed to get a python GUI
|
# Things needed to get a python GUI
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
RUN apt-get install -y python-tk
|
RUN apt install -y python-tk
|
||||||
RUN pip install matplotlib
|
RUN pip install matplotlib
|
||||||
|
|
||||||
# Install a VNC X-server, Frame buffer, and windows manager
|
# Install a VNC X-server, Frame buffer, and windows manager
|
||||||
RUN apt-get install -y x11vnc xvfb fluxbox
|
RUN apt install -y x11vnc xvfb fluxbox
|
||||||
|
|
||||||
# Finally, install wmctrl needed for bootstrap script
|
# Finally, install wmctrl needed for bootstrap script
|
||||||
RUN apt-get install -y wmctrl
|
RUN apt install -y wmctrl
|
||||||
|
|
||||||
# Copy bootstrap script and make sure it runs
|
# Copy bootstrap script and make sure it runs
|
||||||
COPY bootstrap.sh /
|
COPY bootstrap.sh /
|
||||||
|
|
|
@ -1,29 +1,31 @@
|
||||||
|
# GTSAM Ubuntu image with Python wrapper support.
|
||||||
|
|
||||||
# Get the base Ubuntu/GTSAM image from Docker Hub
|
# Get the base Ubuntu/GTSAM image from Docker Hub
|
||||||
FROM dellaert/ubuntu-gtsam:bionic
|
FROM dellaert/ubuntu-gtsam:latest
|
||||||
|
|
||||||
# Install pip
|
# Install pip
|
||||||
RUN apt-get install -y python-pip python-dev
|
RUN apt-get install -y python3-pip python3-dev
|
||||||
|
|
||||||
# Install python wrapper requirements
|
# Install python wrapper requirements
|
||||||
RUN pip install -r /usr/src/gtsam/cython/requirements.txt
|
RUN pip3 install -U -r /usr/src/gtsam/cython/requirements.txt
|
||||||
|
|
||||||
# Run cmake again, now with cython toolbox on
|
# Run cmake again, now with cython toolbox on
|
||||||
WORKDIR /usr/src/gtsam/build
|
WORKDIR /usr/src/gtsam/build
|
||||||
RUN cmake \
|
RUN cmake \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DGTSAM_USE_SYSTEM_EIGEN=ON \
|
|
||||||
-DGTSAM_WITH_EIGEN_MKL=OFF \
|
-DGTSAM_WITH_EIGEN_MKL=OFF \
|
||||||
-DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF \
|
-DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF \
|
||||||
-DGTSAM_BUILD_TIMING_ALWAYS=OFF \
|
-DGTSAM_BUILD_TIMING_ALWAYS=OFF \
|
||||||
-DGTSAM_BUILD_TESTS=OFF \
|
-DGTSAM_BUILD_TESTS=OFF \
|
||||||
-DGTSAM_INSTALL_CYTHON_TOOLBOX=ON \
|
-DGTSAM_INSTALL_CYTHON_TOOLBOX=ON \
|
||||||
|
-DGTSAM_PYTHON_VERSION=3\
|
||||||
..
|
..
|
||||||
|
|
||||||
# Build again, as ubuntu-gtsam image cleaned
|
# Build again, as ubuntu-gtsam image cleaned
|
||||||
RUN make -j3 install && make clean
|
RUN make -j3 install && make clean
|
||||||
|
|
||||||
# Needed to run python wrapper:
|
# Needed to run python wrapper:
|
||||||
RUN echo 'export PYTHONPATH=/usr/local/cython/' >> /root/.bashrc
|
RUN echo 'export PYTHONPATH=/usr/local/cython/:$PYTHONPATH' >> /root/.bashrc
|
||||||
|
|
||||||
# Run bash
|
# Run bash
|
||||||
CMD ["bash"]
|
CMD ["bash"]
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
# Ubuntu image with GTSAM installed. Configured with Boost and TBB support.
|
||||||
|
|
||||||
# Get the base Ubuntu image from Docker Hub
|
# Get the base Ubuntu image from Docker Hub
|
||||||
FROM dellaert/ubuntu-boost-tbb-eigen3:bionic
|
FROM dellaert/ubuntu-boost-tbb:latest
|
||||||
|
|
||||||
# Install git
|
# Install git
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
|
@ -11,13 +13,12 @@ RUN apt-get install -y build-essential
|
||||||
# Clone GTSAM
|
# Clone GTSAM
|
||||||
WORKDIR /usr/src/
|
WORKDIR /usr/src/
|
||||||
RUN git clone https://bitbucket.org/gtborg/gtsam.git
|
RUN git clone https://bitbucket.org/gtborg/gtsam.git
|
||||||
|
RUN mkdir build
|
||||||
|
|
||||||
# Run cmake
|
# Run cmake
|
||||||
RUN mkdir /usr/src/gtsam/build
|
|
||||||
WORKDIR /usr/src/gtsam/build
|
WORKDIR /usr/src/gtsam/build
|
||||||
RUN cmake \
|
RUN cmake \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DGTSAM_USE_SYSTEM_EIGEN=ON \
|
|
||||||
-DGTSAM_WITH_EIGEN_MKL=OFF \
|
-DGTSAM_WITH_EIGEN_MKL=OFF \
|
||||||
-DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF \
|
-DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF \
|
||||||
-DGTSAM_BUILD_TIMING_ALWAYS=OFF \
|
-DGTSAM_BUILD_TIMING_ALWAYS=OFF \
|
||||||
|
@ -26,10 +27,10 @@ RUN cmake \
|
||||||
..
|
..
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
RUN make -j3 install && make clean
|
RUN make -j4 install && make clean
|
||||||
|
|
||||||
# Needed to link with GTSAM
|
# Needed to link with GTSAM
|
||||||
RUN echo 'export LD_LIBRARY_PATH=/usr/local/lib' >> /root/.bashrc
|
RUN echo 'export LD_LIBRARY_PATH=/usr/local/lib:LD_LIBRARY_PATH' >> /root/.bashrc
|
||||||
|
|
||||||
# Run bash
|
# Run bash
|
||||||
CMD ["bash"]
|
CMD ["bash"]
|
||||||
|
|
Loading…
Reference in New Issue