Configure-less Dockerfile. Configure.sh knows # of cores.

Former-commit-id: 0a99e5fa61
pull/1161/head
Alex Hagiopol 2016-07-21 17:15:56 -07:00
rodzic 1e30db786c
commit 2d193c1046
4 zmienionych plików z 75 dodań i 41 usunięć

Wyświetl plik

@ -24,16 +24,9 @@ COPY /tests/ /code/tests/
# Update submodules
RUN git submodule init && git submodule update
# Build OpenDroneMap
RUN bash ./configure.sh
#Make build folder
RUN mkdir build && cd build && cmake .. && make
#Set environment variables
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"
#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)
# Entry point
ENTRYPOINT ["python", "/code/run.py", "--project-path", "/code/"]

Wyświetl plik

@ -43,12 +43,9 @@ Support for Ubuntu 12.04 is currently BROKEN with the addition of OpenSfM and Ce
### Build OpenDroneMap
cd path/to/odm/dir
git clone https://github.com/OpenDroneMap/OpenDroneMap.git .
export PYTHONPATH=$PYTHONPATH:`pwd`/SuperBuild/install/lib/python2.7/dist-packages:`pwd`/SuperBuild/src/opensfm
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/SuperBuild/install/lib
git clone https://github.com/OpenDroneMap/OpenDroneMap.git
cd OpenDroneMap
bash configure.sh
mkdir build && cd build && cmake .. && make && cd ..
For Ubuntu 15.10 users, this will help you get running:
@ -122,8 +119,7 @@ You can also view the orthophoto GeoTIFF in QGIS or other mapping software:
(Instructions below apply to Ubuntu 14.04, but the Docker image workflow
has equivalent procedures for Mac OS X and Windows. See [docs.docker.com](docs.docker.com))
OpenDroneMap is Dockerized, meaning you can use containerization to build and run it without manually performing the
installation procedure described above and - most importantly - without tampering with the libraries and packages already
OpenDroneMap is Dockerized, meaning you can use containerization to build and run it without tampering with the configuration of libraries and packages already
installed on your machine. Docker software is free to install and use in this context. If you don't have it installed,
see the [Docker Ubuntu installation tutorial] (https://docs.docker.com/engine/installation/linux/ubuntulinux/) and follow the
instructions up until "Create a Docker group" inclusive. Once Docker is installed, an OpenDroneMap Docker image can be created

Wyświetl plik

@ -1,17 +1,26 @@
#!/bin/bash
#Add necessary paths. Also add to .bashrc
echo "Adding library paths to ~/.bashrc"
export PYTHONPATH=$PYTHONPATH:$(pwd)/SuperBuild/install/lib/python2.7/dist-packages
export PYTHONPATH=$PYTHONPATH:$(pwd)/SuperBuild/src/opensfm
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/SuperBuild/install/lib
echo 'export PYTHONPATH=$PYTHONPATH:$(pwd)/SuperBuild/install/lib/python2.7/dist-packages' >> ~/.bashrc
echo 'export PYTHONPATH=$PYTHONPATH:$(pwd)/SuperBuild/src/opensfm' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/SuperBuild/install/lib' >> ~/.bashrc
## Before installing
echo "Updating the system"
sudo apt-get update
echo "Installing Required Requisites"
sudo apt-get install -y build-essential \
sudo apt-get install -y -qq build-essential \
git \
python-pip \
libgdal-dev \
gdal-bin \
libgeotiff-dev \
pkg-config -qq
pkg-config
echo "Getting CMake 3.1 for MVS-Texturing"
sudo apt-get install -y software-properties-common python-software-properties
@ -20,7 +29,7 @@ sudo apt-get update -y
sudo apt-get install cmake -y
echo "Installing OpenCV Dependencies"
sudo apt-get install -y libgtk2.0-dev \
sudo apt-get install -y -qq libgtk2.0-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
@ -37,14 +46,14 @@ sudo apt-get install -y libgtk2.0-dev \
libxext-dev \
liblapack-dev \
libeigen3-dev \
libvtk5-dev -qq
libvtk5-dev
echo "Removing libdc1394-22-dev due to python opencv issue"
sudo apt-get remove libdc1394-22-dev
## Installing OpenSfM Requisites
echo "Installing OpenSfM Dependencies"
sudo apt-get install -y python-networkx \
sudo apt-get install -y -qq python-networkx \
libgoogle-glog-dev \
libsuitesparse-dev \
libboost-filesystem-dev \
@ -52,7 +61,7 @@ sudo apt-get install -y python-networkx \
libboost-regex-dev \
libboost-python-dev \
libboost-date-time-dev \
libboost-thread-dev -y -qq
libboost-thread-dev
sudo pip install -U PyYAML \
exifread \
@ -61,9 +70,9 @@ sudo pip install -U PyYAML \
echo "Installing Ecto Dependencies"
sudo pip install -U catkin-pkg
sudo apt-get install -y python-empy \
sudo apt-get install -y -qq python-empy \
python-nose \
python-pyside -qq
python-pyside
echo "Installing OpenDroneMap Dependencies"
sudo apt-get install -y python-pyexiv2 \
@ -74,6 +83,11 @@ sudo apt-get install -y python-pyexiv2 \
echo "Compiling SuperBuild"
cd SuperBuild
mkdir -p build && cd build
cmake .. && make -j8
cmake .. && make -j$(nproc)
echo "Compiling build"
cd ../..
mkdir -p build && cd build
cmake .. && make -j$(nproc)
echo "Configuration Finished"

Wyświetl plik

@ -4,18 +4,26 @@ MAINTAINER Alex Hagiopol <alex.hagiopol@icloud.com>
# Env variables
ENV DEBIAN_FRONTEND noninteractive
# Install dependencies
#Install dependencies
#Required Requisites
RUN apt-get update \
&& sudo apt-get remove libdc1394-22-dev \
&& apt-get install -y \
build-essential \
cmake \
git \
python-pip \
libgdal-dev \
libgeotiff-dev \
pkg-config \
libgtk2.0-dev \
&& apt-get install -y -qq \
build-essential \
git \
python-pip \
libgdal-dev \
gdal-bin \
libgeotiff-dev \
pkg-config
#CMake 3.1 for MVS-Texturing
RUN sudo apt-get install -y software-properties-common python-software-properties
RUN sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
RUN sudo apt-get update -y
RUN sudo apt-get install cmake -y
#Installing OpenCV Dependencies
RUN sudo apt-get install -y -qq libgtk2.0-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
@ -32,8 +40,13 @@ RUN apt-get update \
libxext-dev \
liblapack-dev \
libeigen3-dev \
libvtk5-dev \
python-networkx \
libvtk5-dev
#Removing libdc1394-22-dev due to python opencv issue
RUN sudo apt-get remove libdc1394-22-dev
#Installing OpenSfM Dependencies
RUN sudo apt-get install -y -qq python-networkx \
libgoogle-glog-dev \
libsuitesparse-dev \
libboost-filesystem-dev \
@ -41,8 +54,25 @@ RUN apt-get update \
libboost-regex-dev \
libboost-python-dev \
libboost-date-time-dev \
libboost-thread-dev \
python-empy \
libboost-thread-dev
RUN sudo pip install -U PyYAML \
exifread \
gpxpy \
xmltodict \
catkin-pkg
#Installing Ecto Dependencies
RUN sudo apt-get install -y -qq python-empy \
python-nose \
python-pyside
#"Installing OpenDroneMap Dependencies"
RUN sudo apt-get install -y python-pyexiv2 \
python-scipy \
jhead \
liblas-bin -y -qq
RUN sudo apt-get install -y python-empy \
python-nose \
python-pyside \
python-pyexiv2 \
@ -56,3 +86,4 @@ RUN apt-get update \
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"