Giant fix for Docker run failure due to lack of Ecto. Configure.sh is not finalized.

Former-commit-id: 27663156af
pull/1161/head
Alex Hagiopol 2016-07-20 19:14:22 -07:00
rodzic 9d85722990
commit 8a0ec303ca
4 zmienionych plików z 74 dodań i 67 usunięć

Wyświetl plik

@ -1,6 +1,7 @@
Dockerfile
tests/test_data
SuperBuild/build
build
opensfm
pmvs
odm_orthophoto
@ -8,4 +9,3 @@ odm_texturing
odm_meshing
odm_georeferencing
images_resize
build

Wyświetl plik

@ -1,3 +1,4 @@
#Pull in previously built packages image with lots of libraries.
FROM packages
# Prepare directories`
@ -5,7 +6,20 @@ RUN mkdir /code
WORKDIR /code
# 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
RUN git submodule init && git submodule update
@ -16,10 +30,10 @@ 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"
ENV SESSION="DDODMMAP_SESSION"
# Entry point
ENTRYPOINT ["python", "/code/run.py", "--project-path", "/code/"]

Wyświetl plik

@ -1,27 +1,26 @@
#!/bin/bash
# Check OS
if [ ! $(command -v apt-get) ]; then
echo -e "\e[1;31mERROR: Not a Debian-based linux system.
Impossible to install OpenCV with this script\e[0;39m"
exit 1
fi
#if [ ! $(command -v apt-get) ]; then
# echo -e "\e[1;31mERROR: Not a Debian-based linux system.
# Impossible to install OpenCV with this script\e[0;39m"
# exit 1
#fi
## 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
END_CMD1=$?
#END_CMD1=$?
# sudo apt-get upgrade -y
# END_CMD2=$?
if [ $END_CMD1 -ne 0 ]
then
echo -e "\e[1;31mERROR: \e[39mWhen Updating the system\e[0m"
exit 1
fi
#if [ $END_CMD1 -ne 0 ]
#then
# echo -e "\e[1;31mERROR: \e[39mWhen Updating the system\e[0m"
# exit 1
#fi
## Install Required Requisites
echo -e "\e[1;34mInstalling Required Requisites\e[0;39m"
sudo apt-get install build-essential \
#echo -e "\e[1;34mInstalling Required Requisites\e[0;39m"
sudo apt-get install -y build-essential \
cmake \
git \
python-pip \
@ -30,21 +29,21 @@ sudo apt-get install build-essential \
libgeotiff-dev \
pkg-config -y -qq
# If we have ubuntu version 14.04, the cmake version in apt-get is too low for mvs-texturing.
if [[ `lsb_release -rs` == "14.04" ]];
then
bash upgradecmake.sh
fi
# Upgrade CMake for mvs-texturing
sudo apt-get install -y software-properties-common python-software-properties
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
sudo apt-get update -y
sudo apt-get install cmake -y
if [ $? -ne 0 ]
then
echo -e "\e[1;31mERROR: \e[39mWhen Installing Required Requisites\e[0m"
exit 1
fi
#if [ $? -ne 0 ]
#then
# echo -e "\e[1;31mERROR: \e[39mWhen Installing Required Requisites\e[0m"
# exit 1
#fi
## Installing Optional Requisites
echo -e "\e[1;34mInstalling OpenCV Dependencies\e[0;39m"
sudo apt-get install libgtk2.0-dev \
#echo -e "\e[1;34mInstalling OpenCV Dependencies\e[0;39m"
sudo apt-get install -y libgtk2.0-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
@ -62,19 +61,19 @@ sudo apt-get install libgtk2.0-dev \
liblapack-dev \
libeigen3-dev \
libvtk5-dev -y -qq
if [ $? -ne 0 ]
then
echo -e "\e[1;31mERROR: \e[39mError when Installing Dependencies Requisites\e[0m"
exit 1
fi
#if [ $? -ne 0 ]
#then
# echo -e "\e[1;31mERROR: \e[39mError when Installing Dependencies Requisites\e[0m"
# exit 1
#fi
## 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
## Installing OpenSfM Requisites
echo -e "\e[1;34mInstalling OpenSfM Dependencies\e[0;39m"
sudo apt-get install python-networkx \
#echo -e "\e[1;34mInstalling OpenSfM Dependencies\e[0;39m"
sudo apt-get install -y python-networkx \
libgoogle-glog-dev \
libsuitesparse-dev \
libboost-filesystem-dev \
@ -88,45 +87,45 @@ sudo pip install -U PyYAML \
exifread \
gpxpy \
xmltodict
if [ $? -ne 0 ]
then
echo -e "\e[1;31mERROR: \e[39mError when Installing OpenSfM Dependencies\e[0m"
exit 1
fi
#if [ $? -ne 0 ]
#then
# echo -e "\e[1;31mERROR: \e[39mError when Installing OpenSfM Dependencies\e[0m"
# exit 1
#fi
## 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 apt-get install python-empy \
sudo apt-get install -y python-empy \
python-nose \
python-pyside -y -qq
if [ $? -ne 0 ]
then
echo -e "\e[1;31mERROR: \e[39mError when Installing Ecto Dependencies\e[0m"
exit 1
fi
#if [ $? -ne 0 ]
#then
# echo -e "\e[1;31mERROR: \e[39mError when Installing Ecto Dependencies\e[0m"
# exit 1
#fi
## Installing OpenDroneMap Requisites
echo -e "\e[1;34mInstalling OpenDroneMap Dependencies\e[0;39m"
sudo apt-get install python-pyexiv2 \
#echo -e "\e[1;34mInstalling OpenDroneMap Dependencies\e[0;39m"
sudo apt-get install -y python-pyexiv2 \
python-scipy \
jhead \
liblas-bin -y -qq
if [ $? -ne 0 ]
then
echo -e "\e[1;31mERROR: \e[39mError when Installing OpenDroneMap Dependencies\e[0m"
exit 1
fi
#if [ $? -ne 0 ]
#then
# echo -e "\e[1;31mERROR: \e[39mError when Installing OpenDroneMap Dependencies\e[0m"
# exit 1
#fi
## Get sys vars
NUM_CORES=`grep -c processor /proc/cpuinfo`
#NUM_CORES=`grep -c processor /proc/cpuinfo`
## 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
cd SuperBuild
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"

Wyświetl plik

@ -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
MAINTAINER Danilo Bargen <mail@dbrgn.ch>
MAINTAINER Alex Hagiopol <alex.hagiopol@icloud.com>
# Env variables