From 5fb99673687854de20d0db44850d81b0752e1cc6 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 20 Jun 2017 10:35:33 -0400 Subject: [PATCH] Modified dockerfile, configure.sh script to install lidar2dems module --- .gitmodules | 6 +++--- Dockerfile | 11 +++++++++-- configure.sh | 17 +++++++++++++++++ modules/lidar2dems | 1 + 4 files changed, 30 insertions(+), 5 deletions(-) create mode 160000 modules/lidar2dems diff --git a/.gitmodules b/.gitmodules index b01146d3..3a5f4fa0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "src/bundler"] - path = src/bundler - url = https://github.com/chris-cooper/bundler_sfm +[submodule "modules/lidar2dems"] + path = modules/lidar2dems + url = https://github.com/pierotofy/lidar2dems diff --git a/Dockerfile b/Dockerfile index 73278c3d..1ea62125 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,12 +14,12 @@ RUN apt-get install --no-install-recommends -y git cmake python-pip build-essent libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libflann-dev \ libproj-dev libxext-dev liblapack-dev libeigen3-dev libvtk5-dev python-networkx libgoogle-glog-dev libsuitesparse-dev libboost-filesystem-dev libboost-iostreams-dev \ libboost-regex-dev libboost-python-dev libboost-date-time-dev libboost-thread-dev python-pyproj python-empy python-nose python-pyside python-pyexiv2 python-scipy \ -jhead liblas-bin python-matplotlib libatlas-base-dev libgmp-dev libmpfr-dev +jhead liblas-bin python-matplotlib libatlas-base-dev libgmp-dev libmpfr-dev swig2.0 python-wheel libboost-log-dev libxslt-dev RUN apt-get remove libdc1394-22-dev RUN pip install --upgrade pip RUN pip install setuptools -RUN pip install -U PyYAML exifread gpxpy xmltodict catkin-pkg appsettings +RUN pip install -U PyYAML exifread gpxpy xmltodict catkin-pkg appsettings https://github.com/Applied-GeoSolutions/gippy/archive/v0.3.9.tar.gz ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python2.7/dist-packages" ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm" @@ -44,10 +44,17 @@ COPY /SuperBuild/CMakeLists.txt /code/SuperBuild/CMakeLists.txt COPY docker.settings.yaml /code/settings.yaml COPY VERSION /code/VERSION + #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) +# Update and initialize git submodules +RUN git submodule update --init + +# Setup lidar2dems +RUN CPLUS_INCLUDE_PATH=/usr/include/gdal C_INCLUDE_PATH=/usr/include/gdal /code/modules/lidar2dems/setup.py install && ln -s /code/SuperBuild/build/pdal/bin/pdal /usr/bin/pdal + RUN apt-get -y remove libgl1-mesa-dri git cmake python-pip build-essential RUN apt-get install -y libvtk5-dev diff --git a/configure.sh b/configure.sh index 9593e849..199fb378 100755 --- a/configure.sh +++ b/configure.sh @@ -86,6 +86,23 @@ install() { jhead \ liblas-bin + echo "Installing lidar2dems Dependencies" + sudo apt-get install -y -qq swig2.0 \ + python-wheel \ + libboost-log-dev \ + libxslt-dev + + echo "Updating and initializing git submodules" + git submodule update --init + + echo "Installing lidar2dems" + cd ${RUNPATH}/modules/lidar2dems + CPLUS_INCLUDE_PATH=/usr/include/gdal C_INCLUDE_PATH=/usr/include/gdal ./setup.py install + + if [ ! -f /usr/bin/pdal ]; then + ln -s ${RUNPATH}/SuperBuild/build/pdal/bin/pdal /usr/bin/pdal + fi + echo "Compiling SuperBuild" cd ${RUNPATH}/SuperBuild mkdir -p build && cd build diff --git a/modules/lidar2dems b/modules/lidar2dems new file mode 160000 index 00000000..fe0710bd --- /dev/null +++ b/modules/lidar2dems @@ -0,0 +1 @@ +Subproject commit fe0710bd68e6add3be5621e94f20f56c1e99fd00