Changeset 984 for trunk/Dockerfile


Ignore:
Timestamp:
Mar 3, 2021, 3:41:55 PM (15 months ago)
Author:
djay
Message:

Take into account building ZOO-Project on ubuntu focal (cf. https://trac.osgeo.org/osgeolive/ticket/2282). Add the OTB and SAGA support to the Dockerfile to make the corresponding demos using docker WPS server. Add OGC API - Processes demo to the demos list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Dockerfile

    r982 r984  
    1414    libmapserver-dev \
    1515    libmozjs185-dev \
     16    \
     17    saga \
     18    libsaga-api-7.3.0 \
     19    libotb \
     20    otb-bin \
     21    \
    1622    libpq5 \
    1723    libpython3.6 \
     
    4955    gettext-base \
    5056    \
     57    # Comment lines bellow if nor OTB nor SAGA \
     58    libotb-dev \
     59    otb-qgis \
     60    otb-bin-qt \
     61    qttools5-dev \
     62    qttools5-dev-tools \
     63    qtbase5-dev \
     64    libqt5opengl5-dev \
     65    libtinyxml-dev \
     66    libfftw3-dev \
     67    cmake \
     68    libsaga-dev \
     69    # Comment lines before this one if nor OTB nor SAGA \
     70    \
    5171    libfcgi-dev \
    5272    libgdal-dev \
     73    libwxgtk3.0-dev \
    5374    libjson-c-dev \
    5475    libssh2-1-dev \
     
    7091    && cd ./zoo-project/zoo-kernel \
    7192    && autoconf \
    72     && ./configure --with-python=/usr --with-pyvers=3.6 --with-js=/usr --with-mapserver=/usr --with-ms-version=7 --with-json=/usr --with-db-backend --prefix=/usr \
     93    && ./configure --with-python=/usr --with-pyvers=3.6 --with-js=/usr --with-mapserver=/usr --with-ms-version=7 --with-json=/usr --with-r=/usr --with-db-backend --prefix=/usr --with-otb=/usr/ --with-itk=/usr --with-otb-version=6.6 --with-itk-version=4.12 --with-saga=/usr --with-saga-version=7.2 --with-wx-config=/usr/bin/wx-config \
    7394    && make \
    7495    && make install \
     
    82103    && cp ../zoo-services/hello-py/cgi-env/* /usr/lib/cgi-bin/ \
    83104    && cp ../zoo-services/hello-js/cgi-env/* /usr/lib/cgi-bin/ \
     105    && cp ../zoo-services/hello-r/cgi-env/* /usr/lib/cgi-bin/ \
    84106    && cp ../zoo-api/js/* /usr/lib/cgi-bin/ \
     107    && cp ../zoo-api/r/minimal.r /usr/lib/cgi-bin/ \
    85108    \
    86109    && cp oas.cfg /usr/lib/cgi-bin/ \
     
    88111    # TODO: main.cfg is not processed \
    89112    && prefix=/usr envsubst < main.cfg > /usr/lib/cgi-bin/main.cfg \
     113    \
     114    #Comment lines below from here if no OTB \
     115    && mkdir otb_build \
     116    && cd otb_build \
     117    && cmake ../../../thirds/otb2zcfg \
     118    && make \
     119    && mkdir OTB \
     120    && cd OTB \
     121    && ITK_AUTOLOAD_PATH=/usr/lib/x86_64-linux-gnu/otb/applications/ ../otb2zcfg \
     122    && mkdir /usr/lib/cgi-bin/OTB \
     123    && cp *zcfg /usr/lib/cgi-bin/OTB \
     124    #&& for i in *zcfg; do cp $i /usr/lib/cgi-bin/$i ; j="$(echo $i | sed "s:.zcfg::g")" ; sed "s:$j:OTB_$j:g" -i  /usr/lib/cgi-bin/OTB_$i ; done \
     125    #Comment lines before this one if no OTB \
     126    \
     127    #Comment lines below from here if no SAGA \
     128    && cd .. \
     129    && make -C ../../../thirds/saga2zcfg \
     130    && mkdir zcfgs \
     131    && cd zcfgs \
     132    && dpkg -L saga \
     133    && export MODULE_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/saga/ \
     134    && export SAGA_MLB=/usr/lib/x86_64-linux-gnu/saga/ \
     135    && ln -s /usr/lib/x86_64-linux-gnu/saga/ /usr/lib/saga \
     136    && ../../../../thirds/saga2zcfg/saga2zcfg \
     137    && mkdir /usr/lib/cgi-bin/SAGA \
     138    && ls \
     139    && cp -r * /usr/lib/cgi-bin/SAGA \
     140    #Remove OTB if not built or SAGA if no SAGA \
     141    && for j in OTB SAGA ; do for i in $(find /usr/lib/cgi-bin/$j/ -name "*zcfg"); do sed "s:image/png:image/png\n     useMapserver = true\n     msClassify = true:g;s:text/xml:text/xml\n     useMapserver = true:g;s:mimeType = application/x-ogc-aaigrid:mimeType = application/x-ogc-aaigrid\n   </Supported>\n   <Supported>\n     mimeType = image/png\n     useMapserver=true:g" -i $i; done; done \
     142    \
     143    && cd ../.. \
     144    #Comment lines before this one if nor OTB nor SAGA \
    90145    \
    91146    && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $BUILD_DEPS \
     
    158213ARG BUILD_DEPS=" \
    159214    git \
     215    \
    160216"
    161217WORKDIR /zoo-project
     
    164220    && apt-get update && apt-get install -y --no-install-recommends $BUILD_DEPS \
    165221    \
    166     && git clone https://github.com/ZOO-Project/examples.git
     222    && git clone https://github.com/ZOO-Project/examples.git \
     223    && git clone https://github.com/swagger-api/swagger-ui.git
    167224
    168225#
     
    174231    apache2 \
    175232    curl \
     233    cgi-mapserver \
     234    mapserver-bin \
     235    #Uncomment the line below to add vi editor \
     236    #vim \
     237    #Uncomment the lines below to add debuging \
     238    #valgrind \
     239    #gdb \
    176240"
    177241
     
    190254COPY --from=demos /zoo-project/examples/data/ /usr/com/zoo-project/
    191255COPY --from=demos /zoo-project/examples/ /var/www/html/
     256COPY --from=demos /zoo-project/swagger-ui /var/www/html/swagger-ui
    192257
    193258
     
    195260    && apt-get update && apt-get install -y --no-install-recommends $RUN_DEPS \
    196261    \
     262    && sed "s=https://petstore.swagger.io/v2/swagger.json=http://localhost/ogc-api/api=g" -i /var/www/html/swagger-ui/dist/index.html \
     263    && mv  /var/www/html/swagger-ui/dist  /var/www/html/swagger-ui/oapip \
     264    && ln -s /tmp/ /var/www/html/temp \
     265    && ln -s /usr/lib/x86_64-linux-gnu/saga/ /usr/lib/saga \
    197266    && rm -rf /var/lib/apt/lists/* \
    198267    && pip3 install Cheetah3 redis\
    199268    && sed "s:AllowOverride None:AllowOverride All:g" -i /etc/apache2/apache2.conf \
    200269    && mkdir -p /tmp/statusInfos \
    201     && chown www-data:www-data -R /tmp/statusInfos \
     270    && chown www-data:www-data -R /tmp/statusInfos /usr/com/zoo-project \
    202271    && a2enmod cgi rewrite
    203272
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png