kopia lustrzana https://github.com/OpenDroneMap/ODM
Giant fix for Docker run failure due to lack of Ecto. Configure.sh is not finalized.
Former-commit-id: 27663156af
pull/1161/head
rodzic
9d85722990
commit
8a0ec303ca
|
@ -1,6 +1,7 @@
|
||||||
Dockerfile
|
Dockerfile
|
||||||
tests/test_data
|
tests/test_data
|
||||||
SuperBuild/build
|
SuperBuild/build
|
||||||
|
build
|
||||||
opensfm
|
opensfm
|
||||||
pmvs
|
pmvs
|
||||||
odm_orthophoto
|
odm_orthophoto
|
||||||
|
@ -8,4 +9,3 @@ odm_texturing
|
||||||
odm_meshing
|
odm_meshing
|
||||||
odm_georeferencing
|
odm_georeferencing
|
||||||
images_resize
|
images_resize
|
||||||
build
|
|
18
Dockerfile
18
Dockerfile
|
@ -1,3 +1,4 @@
|
||||||
|
#Pull in previously built packages image with lots of libraries.
|
||||||
FROM packages
|
FROM packages
|
||||||
|
|
||||||
# Prepare directories`
|
# Prepare directories`
|
||||||
|
@ -5,7 +6,20 @@ RUN mkdir /code
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
|
|
||||||
# Add repository files
|
# Add repository files
|
||||||
ADD . /code/
|
ADD ccd_defs_check.py /code/ccd_defs_check.py
|
||||||
|
ADD CMakeLists.txt /code/CMakeLists.txt
|
||||||
|
ADD configure.sh /code/configure.sh
|
||||||
|
ADD /.git/ /code/.git/
|
||||||
|
ADD .gitignore /code/.gitignore
|
||||||
|
ADD .gitmodules /code/.gitmodules
|
||||||
|
ADD /modules/ /code/modules/
|
||||||
|
ADD /opendm/ /code/opendm/
|
||||||
|
ADD /patched_files/ /code/patched_files/
|
||||||
|
ADD run.py /code/run.py
|
||||||
|
ADD /scripts/ /code/scripts/
|
||||||
|
ADD /SuperBuild/cmake/ /code/SuperBuild/cmake/
|
||||||
|
ADD /SuperBuild/CMakeLists.txt /code/SuperBuild/CMakeLists.txt
|
||||||
|
ADD /tests/ /code/tests/
|
||||||
|
|
||||||
# Update submodules
|
# Update submodules
|
||||||
RUN git submodule init && git submodule update
|
RUN git submodule init && git submodule update
|
||||||
|
@ -16,10 +30,10 @@ RUN bash ./configure.sh
|
||||||
#Make build folder
|
#Make build folder
|
||||||
RUN mkdir build && cd build && cmake .. && make
|
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/install/lib/python2.7/dist-packages"
|
||||||
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
|
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
|
||||||
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
|
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
|
||||||
ENV SESSION="DDODMMAP_SESSION"
|
|
||||||
|
|
||||||
# Entry point
|
# Entry point
|
||||||
ENTRYPOINT ["python", "/code/run.py", "--project-path", "/code/"]
|
ENTRYPOINT ["python", "/code/run.py", "--project-path", "/code/"]
|
||||||
|
|
115
configure.sh
115
configure.sh
|
@ -1,27 +1,26 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Check OS
|
# Check OS
|
||||||
if [ ! $(command -v apt-get) ]; then
|
#if [ ! $(command -v apt-get) ]; then
|
||||||
echo -e "\e[1;31mERROR: Not a Debian-based linux system.
|
# echo -e "\e[1;31mERROR: Not a Debian-based linux system.
|
||||||
Impossible to install OpenCV with this script\e[0;39m"
|
# Impossible to install OpenCV with this script\e[0;39m"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
## Before installing
|
## Before installing
|
||||||
echo -e "\e[1;34mUpdating the system\e[0;39m"
|
#echo -e "\e[1;34mUpdating the system\e[0;39m"
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
END_CMD1=$?
|
#END_CMD1=$?
|
||||||
# sudo apt-get upgrade -y
|
# sudo apt-get upgrade -y
|
||||||
# END_CMD2=$?
|
# END_CMD2=$?
|
||||||
if [ $END_CMD1 -ne 0 ]
|
#if [ $END_CMD1 -ne 0 ]
|
||||||
then
|
#then
|
||||||
echo -e "\e[1;31mERROR: \e[39mWhen Updating the system\e[0m"
|
# echo -e "\e[1;31mERROR: \e[39mWhen Updating the system\e[0m"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
## Install Required Requisites
|
## Install Required Requisites
|
||||||
echo -e "\e[1;34mInstalling Required Requisites\e[0;39m"
|
#echo -e "\e[1;34mInstalling Required Requisites\e[0;39m"
|
||||||
sudo apt-get install build-essential \
|
sudo apt-get install -y build-essential \
|
||||||
cmake \
|
cmake \
|
||||||
git \
|
git \
|
||||||
python-pip \
|
python-pip \
|
||||||
|
@ -30,21 +29,21 @@ sudo apt-get install build-essential \
|
||||||
libgeotiff-dev \
|
libgeotiff-dev \
|
||||||
pkg-config -y -qq
|
pkg-config -y -qq
|
||||||
|
|
||||||
# If we have ubuntu version 14.04, the cmake version in apt-get is too low for mvs-texturing.
|
# Upgrade CMake for mvs-texturing
|
||||||
if [[ `lsb_release -rs` == "14.04" ]];
|
sudo apt-get install -y software-properties-common python-software-properties
|
||||||
then
|
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
|
||||||
bash upgradecmake.sh
|
sudo apt-get update -y
|
||||||
fi
|
sudo apt-get install cmake -y
|
||||||
|
|
||||||
if [ $? -ne 0 ]
|
#if [ $? -ne 0 ]
|
||||||
then
|
#then
|
||||||
echo -e "\e[1;31mERROR: \e[39mWhen Installing Required Requisites\e[0m"
|
# echo -e "\e[1;31mERROR: \e[39mWhen Installing Required Requisites\e[0m"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
## Installing Optional Requisites
|
## Installing Optional Requisites
|
||||||
echo -e "\e[1;34mInstalling OpenCV Dependencies\e[0;39m"
|
#echo -e "\e[1;34mInstalling OpenCV Dependencies\e[0;39m"
|
||||||
sudo apt-get install libgtk2.0-dev \
|
sudo apt-get install -y libgtk2.0-dev \
|
||||||
libavcodec-dev \
|
libavcodec-dev \
|
||||||
libavformat-dev \
|
libavformat-dev \
|
||||||
libswscale-dev \
|
libswscale-dev \
|
||||||
|
@ -62,19 +61,19 @@ sudo apt-get install libgtk2.0-dev \
|
||||||
liblapack-dev \
|
liblapack-dev \
|
||||||
libeigen3-dev \
|
libeigen3-dev \
|
||||||
libvtk5-dev -y -qq
|
libvtk5-dev -y -qq
|
||||||
if [ $? -ne 0 ]
|
#if [ $? -ne 0 ]
|
||||||
then
|
#then
|
||||||
echo -e "\e[1;31mERROR: \e[39mError when Installing Dependencies Requisites\e[0m"
|
# echo -e "\e[1;31mERROR: \e[39mError when Installing Dependencies Requisites\e[0m"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
## Remove libdc1394-22-dev due to python opencv issue
|
## Remove libdc1394-22-dev due to python opencv issue
|
||||||
echo -e "\e[1;34mRemoving libdc1394-22-dev\e[0;39m"
|
#echo -e "\e[1;34mRemoving libdc1394-22-dev\e[0;39m"
|
||||||
sudo apt-get remove libdc1394-22-dev
|
sudo apt-get remove libdc1394-22-dev
|
||||||
|
|
||||||
## Installing OpenSfM Requisites
|
## Installing OpenSfM Requisites
|
||||||
echo -e "\e[1;34mInstalling OpenSfM Dependencies\e[0;39m"
|
#echo -e "\e[1;34mInstalling OpenSfM Dependencies\e[0;39m"
|
||||||
sudo apt-get install python-networkx \
|
sudo apt-get install -y python-networkx \
|
||||||
libgoogle-glog-dev \
|
libgoogle-glog-dev \
|
||||||
libsuitesparse-dev \
|
libsuitesparse-dev \
|
||||||
libboost-filesystem-dev \
|
libboost-filesystem-dev \
|
||||||
|
@ -88,45 +87,45 @@ sudo pip install -U PyYAML \
|
||||||
exifread \
|
exifread \
|
||||||
gpxpy \
|
gpxpy \
|
||||||
xmltodict
|
xmltodict
|
||||||
if [ $? -ne 0 ]
|
#if [ $? -ne 0 ]
|
||||||
then
|
#then
|
||||||
echo -e "\e[1;31mERROR: \e[39mError when Installing OpenSfM Dependencies\e[0m"
|
# echo -e "\e[1;31mERROR: \e[39mError when Installing OpenSfM Dependencies\e[0m"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
## Installing Ecto Requisites
|
## Installing Ecto Requisites
|
||||||
echo -e "\e[1;34mInstalling Ecto Dependencies\e[0;39m"
|
#echo -e "\e[1;34mInstalling Ecto Dependencies\e[0;39m"
|
||||||
sudo pip install -U catkin-pkg
|
sudo pip install -U catkin-pkg
|
||||||
sudo apt-get install python-empy \
|
sudo apt-get install -y python-empy \
|
||||||
python-nose \
|
python-nose \
|
||||||
python-pyside -y -qq
|
python-pyside -y -qq
|
||||||
if [ $? -ne 0 ]
|
#if [ $? -ne 0 ]
|
||||||
then
|
#then
|
||||||
echo -e "\e[1;31mERROR: \e[39mError when Installing Ecto Dependencies\e[0m"
|
# echo -e "\e[1;31mERROR: \e[39mError when Installing Ecto Dependencies\e[0m"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
## Installing OpenDroneMap Requisites
|
## Installing OpenDroneMap Requisites
|
||||||
echo -e "\e[1;34mInstalling OpenDroneMap Dependencies\e[0;39m"
|
#echo -e "\e[1;34mInstalling OpenDroneMap Dependencies\e[0;39m"
|
||||||
sudo apt-get install python-pyexiv2 \
|
sudo apt-get install -y python-pyexiv2 \
|
||||||
python-scipy \
|
python-scipy \
|
||||||
jhead \
|
jhead \
|
||||||
liblas-bin -y -qq
|
liblas-bin -y -qq
|
||||||
if [ $? -ne 0 ]
|
#if [ $? -ne 0 ]
|
||||||
then
|
#then
|
||||||
echo -e "\e[1;31mERROR: \e[39mError when Installing OpenDroneMap Dependencies\e[0m"
|
# echo -e "\e[1;31mERROR: \e[39mError when Installing OpenDroneMap Dependencies\e[0m"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
## Get sys vars
|
## Get sys vars
|
||||||
NUM_CORES=`grep -c processor /proc/cpuinfo`
|
#NUM_CORES=`grep -c processor /proc/cpuinfo`
|
||||||
|
|
||||||
## Add SuperBuild path to the python path
|
## Add SuperBuild path to the python path
|
||||||
export PYTHONPATH=$PYTHONPATH:`pwd`/SuperBuild/install/lib/python2.7/dist-packages:`pwd`/SuperBuild/src/opensfm
|
#export PYTHONPATH=$PYTHONPATH:`pwd`/SuperBuild/install/lib/python2.7/dist-packages:`pwd`/SuperBuild/src/opensfm
|
||||||
|
|
||||||
## Compile SuperBuild
|
## Compile SuperBuild
|
||||||
cd SuperBuild
|
cd SuperBuild
|
||||||
mkdir -p build && cd build
|
mkdir -p build && cd build
|
||||||
cmake .. && make -j${NUM_CORES}
|
cmake .. && make -j8 #${NUM_CORES}
|
||||||
|
|
||||||
echo -e "\e[1;34mScript finished\e[0;39m"
|
#echo -e "\e[1;34mScript finished\e[0;39m"
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
#Help for users:
|
|
||||||
#BUILD COMMAND EXAMPLE: docker build -t alex1 .
|
|
||||||
#AUTOMATIC RUN COMMAND EXAMPLE: docker run -it -v /home/alex/OpenDroneMap/images:/code/images --rm alex1
|
|
||||||
#MANUAL RUN COMMAND EXAMPLE: docker run -it -v /home/alex/OpenDroneMap/images:/code/images --rm --entrypoint bash alex1
|
|
||||||
|
|
||||||
FROM ubuntu:14.04
|
FROM ubuntu:14.04
|
||||||
MAINTAINER Danilo Bargen <mail@dbrgn.ch>
|
|
||||||
MAINTAINER Alex Hagiopol <alex.hagiopol@icloud.com>
|
MAINTAINER Alex Hagiopol <alex.hagiopol@icloud.com>
|
||||||
|
|
||||||
# Env variables
|
# Env variables
|
||||||
|
|
Ładowanie…
Reference in New Issue