Commit b931ba07 authored by Vincent Delbar's avatar Vincent Delbar
Browse files

DOCKER: Update to OTB 7.1 (fix OpenCV4 libs)

parent 7c198027
Pipeline #14474 passed with stage
in 3 minutes and 5 seconds
......@@ -60,12 +60,12 @@ cd moringa
git checkout develop
docker login gitlab-registry.irstea.fr
# OTB base image, example with arg OTB_VERSION=7.0 (default value)
docker build --build-arg OTB_VERSION=7.0 -f docker/base-otb/Dockerfile -t gitlab-registry.irstea.fr/raffaele.gaetano/moringa:base-otb-7.0 .
docker push gitlab-registry.irstea.fr/raffaele.gaetano/moringa:base-otb-7.0
# OTB base image, example with arg OTB_VERSION=7.1 (default value)
docker build --build-arg OTB_VERSION=7.1 -f docker/base-otb/Dockerfile -t gitlab-registry.irstea.fr/raffaele.gaetano/moringa:base-otb-7.1 .
docker push gitlab-registry.irstea.fr/raffaele.gaetano/moringa:base-otb-7.1
# Tag 'base-otb' == default image for next build
docker tag gitlab-registry.irstea.fr/raffaele.gaetano/moringa:base-otb-7.0 gitlab-registry.irstea.fr/raffaele.gaetano/moringa:base-otb
docker tag gitlab-registry.irstea.fr/raffaele.gaetano/moringa:base-otb-7.1 gitlab-registry.irstea.fr/raffaele.gaetano/moringa:base-otb
docker push gitlab-registry.irstea.fr/raffaele.gaetano/moringa:base-otb
# MORINGA build from the 'base-otb' image
......
......@@ -3,8 +3,7 @@ LABEL description="A base image with OTB and remote modules for the MORINGA proc
# Build env
WORKDIR /tmp
ARG OTB_VERSION=7.0
ARG OTB_ARCHIVES="https://www.orfeo-toolbox.org/packages/SuperBuild-archives-$OTB_VERSION.tar.bz2"
ARG OTB_VERSION=7.1
# System dependencies
RUN apt-get update \
......@@ -37,12 +36,9 @@ RUN apt-get update \
# SuperBuild OTB with remote modules, no GUI, no system libs
RUN git clone -b release-$OTB_VERSION "https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb.git" \
&& mkdir SuperBuild-archives \
# Get dependencies source files from archives
#&& cd SuperBuild-archives && curl -s $OTB_ARCHIVES | tar --exclude 'q*' --exclude '*gl*' -xjv \
# SuperBuild
&& mkdir /tmp/build /opt/otb \
&& mkdir /tmp/SuperBuild-archives /tmp/build /opt/otb \
&& cd /tmp/build \
# Build dependencies
&& cmake ../otb/SuperBuild \
-DCMAKE_BUILD_TYPE='Release' \
-DOTB_USE_QT=OFF \
......@@ -52,7 +48,7 @@ RUN git clone -b release-$OTB_VERSION "https://gitlab.orfeo-toolbox.org/orfeotoo
-DOTB_USE_GLFW=OFF \
-DDOWNLOAD_LOCATION=/tmp/SuperBuild-archives \
-DCMAKE_INSTALL_PREFIX=/opt/otb \
&& make -j4 \
&& make OTB_DEPENDS -j4 \
# Clone modules
&& cd /tmp && git clone -b memChain "https://framagit.org/ArthurV/otb-for-biomass.git" \
&& ln -s /tmp/otb-for-biomass/MultitempFiltering /tmp/otb/Modules/Remote/MultitempFiltering \
......@@ -64,6 +60,8 @@ RUN git clone -b release-$OTB_VERSION "https://gitlab.orfeo-toolbox.org/orfeotoo
# Build OTB and modules
&& cd /tmp/build/OTB/build \
&& cmake /tmp/otb \
-DOPENCV_core_LIBRARY=/opt/otb/lib/libopencv_core.so \
-DOPENCV_ml_LIBRARY=/opt/otb/lib/libopencv_ml.so \
-DModule_otbGRM=ON \
-DModule_LSGRM=ON \
-DModule_OTBAppSelectiveHaralickTextures=ON \
......@@ -72,7 +70,8 @@ RUN git clone -b release-$OTB_VERSION "https://gitlab.orfeo-toolbox.org/orfeotoo
-DOTB_WRAP_PYTHON=ON \
-DPYTHON_EXECUTABLE=/usr/bin/python3.6 \
-DCMAKE_INSTALL_PREFIX=/opt/otb \
&& cd /tmp/build && make -j \
&& cd /tmp/build \
&& make -j8 \
# For a lightweight layer
&& rm -rf /tmp/SuperBuild-archives /tmp/otb* /tmp/build /root/.cache /opt/otb/bin/otbgui_*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment