iota2 installation on docker Ubuntu
Hello,
Thank you for iota2,
I'm trying to build a iota2 docker image. Unfortunately, Otb build fail at the opencv step:
Scanning dependencies of target OPENCV
[ 48%] Creating directories for 'OPENCV'
[ 49%] Performing download step (download, verify and extract) for 'OPENCV'
-- OPENCV download command succeeded. See also /data/iota2/scripts/install/OTB/build/OPENCV/src/OPENCV-stamp/OPENCV-download-*.log
[ 49%] No patch step for 'OPENCV'
[ 49%] No update step for 'OPENCV'
[ 50%] Performing configure step for 'OPENCV'
CMake Error at /data/iota2/scripts/install/OTB/build/OPENCV/src/OPENCV-stamp/OPENCV-configure-Release.cmake:16 (message):
Command failed: 1
'env' 'CC=/usr/bin/cc' 'CXX=/usr/bin/g++' '/usr/bin/cmake' '-GUnix Makefiles' '-C/data/iota2/scripts/install/OTB/build/OPENCV/tmp/OPENCV-cache-Release.cmake' '-GUnix Makefiles' '/data/iota2/scripts/install/OTB/build/OPENCV/src/OPENCV'
See also
/data/iota2/scripts/install/OTB/build/OPENCV/src/OPENCV-stamp/OPENCV-configure-*.log
CMakeFiles/OPENCV.dir/build.make:109: recipe for target 'OPENCV/src/OPENCV-stamp/OPENCV-configure' failed
make[2]: *** [OPENCV/src/OPENCV-stamp/OPENCV-configure] Error 1
CMakeFiles/Makefile2:1274: recipe for target 'CMakeFiles/OPENCV.dir/all' failed
make[1]: *** [CMakeFiles/OPENCV.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
The Dockerfile that I'am using is the following:
FROM ubuntu:18.04
COPY acceptOTB.exp /data/
RUN \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y git wget expect && \
cd /data && \
git clone -b develop https://framagit.org/inglada/iota2.git && \
apt-get install -y cmake git g++ python-dev zlib1g-dev freeglut3-dev libx11-dev libxext-dev libxi-dev libboost-all-dev swig gsl-bin libgsl0-dev python-pip python-numpy python-scipy python-matplotlib python-pandas python-pyspatialite libspatialite-dev libspatialite7 libxrandr-dev libxinerama-dev libxcursor-dev && \
pip install argparse config datetime osr dill mpi4py==2.0.0 && \
# build otb
/usr/bin/expect -f acceptOTB.exp
with acceptOTB.exp being:
#!/usr/bin/expect
set timeout -1
spawn ./iota2/scripts/install/generation.sh --all
expect "*Are you*" { send "y\r" }
expect eof
To build the image, copy the Dockerfile
and acceptOTB.exp
file in the same directory and run $ docker build --tag=iotaubuntubuild .
(from the directory containing both files)
Notes:
- I'm not using the init_Ubuntu.sh script because this check fails if the host is not an Ubuntu distribution.
- The expect script is used to automatically answer the question asked by the generation.sh script.