Commit b582512f authored by Luc Hermitte's avatar Luc Hermitte
Browse files

Upgrade base dockerfile for fedora

parent 15c515d2
Pipeline #7702 failed with stages
in 12 minutes
......@@ -33,25 +33,24 @@ LABEL description="This docker allows to have the dependencies of S1Tiling proce
WORKDIR /tmp
LABEL OTB="7.2.0"
ENV OTB_INSTALL_DIRNAME=/opt/otb-7.2.0
ARG OTB_VERSION=7.3.0
LABEL OTB="${OTB_VERSION}"
ENV OTB_INSTALL_DIRNAME=/opt/otb-${OTB_VERSION}
ENV S1TILING_VENV=S1TilingEnv
#ENV DEVTOOLSET devtoolset-9
RUN echo "Europe/Paris" > /etc/timezone
# ----------------------------------------------------------------------------
# External files that need to be present in curent directory
# ----------------------------------------------------------------------------
ADD OTB-7.2.0-Linux64.run /tmp
ADD OTB-${OTB_VERSION}-Linux64.run /tmp
ADD gdal-config /tmp
# ----------------------------------------------------------------------------
# Dependencies
# ----------------------------------------------------------------------------
# SHELL ["/usr/bin/scl", "enable", "${DEVTOOLSET}"]
RUN uname -a \
&& dnf update -y \
&& dnf upgrade -y \
......@@ -59,13 +58,14 @@ RUN uname -a \
which findutils \
freeglut mesa-libEGL-devel mesa-libGL-devel \
&& dnf install -y gcc gcc-c++ cmake \
&& chmod +x ./OTB-7.2.0-Linux64.run \
&& ./OTB-7.2.0-Linux64.run --target "${OTB_INSTALL_DIRNAME}" \
&& chmod +x ./OTB-${OTB_VERSION}-Linux64.run \
&& ./OTB-${OTB_VERSION}-Linux64.run --target "${OTB_INSTALL_DIRNAME}" \
&& chmod +x ./gdal-config \
&& mv ./gdal-config "${OTB_INSTALL_DIRNAME}/bin" \
&& echo "# Patching for s1tiling" >> "${OTB_INSTALL_DIRNAME}/otbenv.profile" \
&& echo 'export LD_LIBRARY_PATH="${CMAKE_PREFIX_PATH}/lib:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"' >> "${OTB_INSTALL_DIRNAME}/otbenv.profile" \
\
&& python3 -m pip install virtualenv \
&& python3 -m virtualenv ${S1TILING_VENV} \
&& . ${S1TILING_VENV}/bin/activate \
&& cd "${OTB_INSTALL_DIRNAME}" \
......@@ -76,16 +76,20 @@ RUN uname -a \
&& ctest -S "${OTB_INSTALL_DIRNAME}/share/otb/swig/build_wrapping.cmake" -VV \
&& cd - \
&& python3 -m pip --no-cache-dir install "gdal==$(gdal-config --version)" \
&& python -c "from osgeo import gdal ; print('GDAL version:', gdal.__version__)" \
\
&& rm -r "${OTB_INSTALL_DIRNAME}/share/otb/swig/build" \
&& rm -r "${OTB_INSTALL_DIRNAME}/bin/otbgui"* \
"${OTB_INSTALL_DIRNAME}/bin/monteverdi" \
"${OTB_INSTALL_DIRNAME}/include" \
"${OTB_INSTALL_DIRNAME}/lib/lib"*Qt* \
"${OTB_INSTALL_DIRNAME}/lib/libOTBMonteverdi"* \
"${OTB_INSTALL_DIRNAME}/lib/fonts" \
\
&& rm ./OTB-7.2.0-Linux64.run \
&& echo "Remove all includes but gdal_version.h" \
&& find "${OTB_INSTALL_DIRNAME}/include" -mindepth 1 -maxdepth 1 -not -name gdal_version.h | xargs rm -r \
&& rm ./OTB-${OTB_VERSION}-Linux64.run \
&& dnf remove -y freeglut mesa-libEGL-devel mesa-libGL-devel gcc gcc-c++ cmake \
&& dnf clean all \
&& echo "Make sure we have libpython3.6m.so" \
&& find /usr/lib -name "libpython3.6*.so*" | grep "." \
&& rm -rf /var/cache/yum /var/cache/dnf
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