2017-04-10 17:02:19 +00:00
|
|
|
FROM phusion/baseimage
|
|
|
|
|
|
|
|
# Env variables
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
2019-03-26 23:21:44 +00:00
|
|
|
#Install dependencies and required requisites
|
|
|
|
RUN apt-get update -y \
|
|
|
|
&& apt-get install -y \
|
|
|
|
software-properties-common \
|
2019-04-24 22:33:12 +00:00
|
|
|
&& add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable \
|
2019-03-26 23:21:44 +00:00
|
|
|
&& add-apt-repository -y ppa:george-edison55/cmake-3.x \
|
|
|
|
&& apt-get update -y
|
2017-04-10 17:02:19 +00:00
|
|
|
|
|
|
|
# All packages (Will install much faster)
|
2019-03-26 23:21:44 +00:00
|
|
|
RUN apt-get install --no-install-recommends -y \
|
|
|
|
build-essential \
|
|
|
|
cmake \
|
|
|
|
gdal-bin \
|
|
|
|
git \
|
|
|
|
libatlas-base-dev \
|
|
|
|
libavcodec-dev \
|
|
|
|
libavformat-dev \
|
|
|
|
libboost-date-time-dev \
|
|
|
|
libboost-filesystem-dev \
|
|
|
|
libboost-iostreams-dev \
|
|
|
|
libboost-log-dev \
|
|
|
|
libboost-python-dev \
|
|
|
|
libboost-regex-dev \
|
|
|
|
libboost-thread-dev \
|
|
|
|
libeigen3-dev \
|
|
|
|
libflann-dev \
|
|
|
|
libgdal-dev \
|
|
|
|
libgeotiff-dev \
|
|
|
|
libgoogle-glog-dev \
|
|
|
|
libgtk2.0-dev \
|
|
|
|
libjasper-dev \
|
|
|
|
libjpeg-dev \
|
|
|
|
libjsoncpp-dev \
|
|
|
|
liblapack-dev \
|
|
|
|
liblas-bin \
|
|
|
|
libpng-dev \
|
|
|
|
libproj-dev \
|
|
|
|
libsuitesparse-dev \
|
|
|
|
libswscale-dev \
|
|
|
|
libtbb2 \
|
|
|
|
libtbb-dev \
|
|
|
|
libtiff-dev \
|
|
|
|
libvtk6-dev \
|
|
|
|
libxext-dev \
|
|
|
|
python-dev \
|
|
|
|
python-gdal \
|
|
|
|
python-matplotlib \
|
|
|
|
python-pip \
|
|
|
|
python-software-properties \
|
|
|
|
python-wheel \
|
2019-05-10 14:05:44 +00:00
|
|
|
swig2.0 \
|
2019-07-10 17:18:50 +00:00
|
|
|
grass-core \
|
|
|
|
libssl-dev
|
2017-04-10 17:02:19 +00:00
|
|
|
|
|
|
|
RUN apt-get remove libdc1394-22-dev
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
RUN pip install setuptools
|
2019-03-26 23:21:44 +00:00
|
|
|
RUN pip install -U \
|
|
|
|
appsettings \
|
|
|
|
exifread \
|
|
|
|
gpxpy \
|
|
|
|
loky \
|
2019-04-25 00:01:44 +00:00
|
|
|
PyYAML==3.13 \
|
2019-03-26 23:21:44 +00:00
|
|
|
repoze.lru \
|
|
|
|
xmltodict \
|
2019-04-29 15:52:39 +00:00
|
|
|
rasterio \
|
2019-05-06 18:17:23 +00:00
|
|
|
attrs==19.1.0 \
|
2019-06-05 19:27:59 +00:00
|
|
|
pyodm==1.5.2b1 \
|
2019-08-08 02:57:48 +00:00
|
|
|
Pillow \
|
2019-09-07 18:21:49 +00:00
|
|
|
networkx \
|
|
|
|
scipy==1.2.1 \
|
|
|
|
numpy==1.15.4 \
|
|
|
|
shapely \
|
2019-09-16 22:28:20 +00:00
|
|
|
pyproj==2.2.2 \
|
2019-09-07 18:21:49 +00:00
|
|
|
psutil \
|
2019-08-08 02:57:48 +00:00
|
|
|
joblib
|
2017-04-10 17:02:19 +00:00
|
|
|
|
2019-05-12 14:56:09 +00:00
|
|
|
RUN pip install --upgrade cryptography && python -m easy_install --upgrade pyOpenSSL
|
|
|
|
|
2017-04-10 17:02:19 +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"
|
|
|
|
|
|
|
|
# Prepare directories
|
|
|
|
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 run.py /code/run.py
|
2017-09-18 20:58:21 +00:00
|
|
|
COPY run.sh /code/run.sh
|
2019-05-09 20:11:03 +00:00
|
|
|
COPY /stages/ /code/stages/
|
2017-04-10 17:02:19 +00:00
|
|
|
COPY /SuperBuild/cmake/ /code/SuperBuild/cmake/
|
|
|
|
COPY /SuperBuild/CMakeLists.txt /code/SuperBuild/CMakeLists.txt
|
|
|
|
COPY docker.settings.yaml /code/settings.yaml
|
|
|
|
COPY VERSION /code/VERSION
|
|
|
|
|
2019-03-26 23:21:44 +00:00
|
|
|
# Compile code in SuperBuild and root directories
|
|
|
|
RUN cd SuperBuild \
|
|
|
|
&& mkdir build \
|
|
|
|
&& cd build \
|
|
|
|
&& cmake .. \
|
|
|
|
&& make -j$(nproc) \
|
|
|
|
&& cd ../.. \
|
|
|
|
&& mkdir build \
|
|
|
|
&& cd build \
|
|
|
|
&& cmake .. \
|
|
|
|
&& make -j$(nproc)
|
|
|
|
|
2017-04-10 17:02:19 +00:00
|
|
|
# Cleanup APT
|
|
|
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
# Clean Superbuild
|
2019-03-26 23:21:44 +00:00
|
|
|
RUN rm -rf \
|
|
|
|
/code/SuperBuild/build/opencv \
|
|
|
|
/code/SuperBuild/download \
|
|
|
|
/code/SuperBuild/src/ceres \
|
|
|
|
/code/SuperBuild/src/mvstexturing \
|
|
|
|
/code/SuperBuild/src/opencv \
|
|
|
|
/code/SuperBuild/src/opengv \
|
|
|
|
/code/SuperBuild/src/pcl \
|
|
|
|
/code/SuperBuild/src/pdal
|
2017-04-10 17:02:19 +00:00
|
|
|
|
|
|
|
# Entry point
|
2019-06-20 01:43:34 +00:00
|
|
|
ENTRYPOINT ["python", "/code/run.py"]
|
2017-04-10 17:02:19 +00:00
|
|
|
|