2017-04-06 12:35:04 +00:00
|
|
|
FROM phusion/baseimage
|
|
|
|
|
|
|
|
# Env variables
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
|
|
|
#Install dependencies
|
|
|
|
#Required Requisites
|
|
|
|
RUN add-apt-repository -y ppa:ubuntugis/ppa
|
|
|
|
RUN add-apt-repository -y ppa:george-edison55/cmake-3.x
|
|
|
|
RUN apt-get update -y
|
|
|
|
|
|
|
|
# All packages (Will install much faster)
|
|
|
|
RUN apt-get install --no-install-recommends -y git cmake python-pip build-essential software-properties-common python-software-properties libgdal-dev gdal-bin libgeotiff-dev \
|
2019-01-23 15:11:43 +00:00
|
|
|
libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev python-dev libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libflann-dev \
|
2018-01-03 15:05:19 +00:00
|
|
|
libproj-dev libxext-dev liblapack-dev libeigen3-dev libvtk6-dev python-networkx libgoogle-glog-dev libsuitesparse-dev libboost-filesystem-dev libboost-iostreams-dev \
|
2019-01-23 15:11:43 +00:00
|
|
|
libboost-regex-dev libboost-python-dev libboost-date-time-dev libboost-thread-dev python-pyproj python-empy python-nose python-pyside \
|
2018-09-13 20:56:49 +00:00
|
|
|
liblas-bin python-matplotlib libatlas-base-dev swig2.0 python-wheel libboost-log-dev libjsoncpp-dev python-gdal
|
2017-04-06 12:35:04 +00:00
|
|
|
|
|
|
|
RUN apt-get remove libdc1394-22-dev
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
RUN pip install setuptools
|
2019-01-29 03:18:35 +00:00
|
|
|
RUN pip install -U PyYAML exifread gpxpy xmltodict catkin-pkg appsettings https://github.com/OpenDroneMap/gippy/archive/numpyfix.zip loky shapely scipy numpy==1.15.4 pyproj psutil repoze.lru
|
2017-04-06 12:35:04 +00:00
|
|
|
|
|
|
|
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python2.7/dist-packages"
|
|
|
|
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
|
|
|
|
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
|
2016-11-30 13:20:26 +00:00
|
|
|
|
|
|
|
# Prepare directories
|
2017-04-06 12:35:04 +00:00
|
|
|
|
2016-11-30 13:20:26 +00:00
|
|
|
RUN mkdir /code
|
|
|
|
WORKDIR /code
|
|
|
|
|
|
|
|
# Copy repository files
|
|
|
|
COPY CMakeLists.txt /code/CMakeLists.txt
|
|
|
|
COPY configure.sh /code/configure.sh
|
|
|
|
COPY /modules/ /code/modules/
|
|
|
|
COPY /opendm/ /code/opendm/
|
|
|
|
COPY /patched_files/ /code/patched_files/
|
|
|
|
COPY run.py /code/run.py
|
2017-09-18 20:58:21 +00:00
|
|
|
COPY run.sh /code/run.sh
|
2016-11-30 13:20:26 +00:00
|
|
|
COPY /scripts/ /code/scripts/
|
|
|
|
COPY /SuperBuild/cmake/ /code/SuperBuild/cmake/
|
|
|
|
COPY /SuperBuild/CMakeLists.txt /code/SuperBuild/CMakeLists.txt
|
2017-03-30 14:16:24 +00:00
|
|
|
COPY docker.settings.yaml /code/settings.yaml
|
2017-03-30 18:27:14 +00:00
|
|
|
COPY VERSION /code/VERSION
|
2016-11-30 13:20:26 +00:00
|
|
|
|
|
|
|
# Replace g++ and gcc with our own scripts
|
|
|
|
COPY /docker/ /code/docker/
|
|
|
|
RUN mv -v /usr/bin/gcc /usr/bin/gcc_real && mv -v /usr/bin/g++ /usr/bin/g++_real && cp -v /code/docker/gcc /usr/bin/gcc && cp -v /code/docker/g++ /usr/bin/g++
|
|
|
|
|
|
|
|
#Compile code in SuperBuild and root directories
|
2017-04-06 12:35:04 +00:00
|
|
|
|
|
|
|
RUN cd SuperBuild && mkdir build && cd build && cmake .. && make -j$(nproc) && cd ../.. && mkdir build && cd build && cmake .. && make -j$(nproc)
|
|
|
|
|
|
|
|
RUN apt-get -y remove libgl1-mesa-dri git cmake python-pip build-essential
|
2018-01-15 16:54:16 +00:00
|
|
|
RUN apt-get install -y libvtk6-dev
|
2017-04-06 12:35:04 +00:00
|
|
|
|
|
|
|
# Cleanup APT
|
|
|
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
# Clean Superbuild
|
|
|
|
|
2018-09-13 20:56:49 +00:00
|
|
|
RUN rm -rf /code/SuperBuild/download /code/SuperBuild/src/opencv /code/SuperBuild/src/pcl /code/SuperBuild/src/pdal /code/SuperBuild/src/opengv /code/SuperBuild/src/mvstexturing /code/SuperBuild/src/ceres /code/SuperBuild/build/opencv /code/SuperBuild/src/exiv2lib
|
2016-11-30 13:20:26 +00:00
|
|
|
|
|
|
|
# Entry point
|
2017-03-30 14:16:24 +00:00
|
|
|
ENTRYPOINT ["python", "/code/run.py", "code"]
|
2017-04-06 12:35:04 +00:00
|
|
|
|