From 78ec08509e32f6df89db9847f7d0c7ae2e1438b3 Mon Sep 17 00:00:00 2001 From: De Boissieu Florian <florian.deboissieu@irstea.fr> Date: Thu, 16 Jul 2020 19:02:33 +0200 Subject: [PATCH] Dockerfile moringa --- docker/moringa/Dockerfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 docker/moringa/Dockerfile diff --git a/docker/moringa/Dockerfile b/docker/moringa/Dockerfile new file mode 100644 index 0000000..4dab863 --- /dev/null +++ b/docker/moringa/Dockerfile @@ -0,0 +1,34 @@ +FROM gitlab-registry.irstea.fr/raffaele.gaetano/moringa:base-otb-7.0 +LABEL description="A container for the MORINGA processing chain, CIRAD/UMR TETIS" + +# Compile obiatools library +RUN git clone https://gitlab.irstea.fr/raffaele.gaetano/obiatools.git && cd obiatools/Release \ + && sed -i 's/$HOME\/moringa/\/usr\/local\/lib\/python3.6\/dist-packages/g' configure.sh \ + && sed -i 's/LIB=python3.6/LIB=python3.6m/g' configure.sh \ + && mkdir /usr/local/lib/python3.6/dist-packages/sitsproc_c_modules \ + && touch /usr/local/lib/python3.6/dist-packages/sitsproc_c_modules/__init__.py \ + && bash -c "source configure.sh && make" && cd ../.. && rm -rf obiatools + +# Other python deps: rios, fmask +RUN pip3 install rios.core \ + && wget -q https://github.com/ubarsc/python-fmask/releases/download/pythonfmask-0.5.4/python-fmask-0.5.4.tar.gz \ + && tar -xzf python-fmask-0.5.4.tar.gz && cd python-fmask-0.5.4 \ + && python3 setup.py install && cd .. && rm -rf python-fmask-* +ENV RIOS_DFLT_DRIVER="GTiff" + +# Default user and directory when running a container, is active now +RUN useradd -s /bin/bash -m moringa +USER moringa +WORKDIR /home/moringa + +# Clone peps and theia utils +RUN git clone -b python3 https://github.com/olivierhagolle/theia_download.git \ + && git clone https://github.com/olivierhagolle/peps_download.git + +# Install Sen2Cor +RUN wget -q http://step.esa.int/thirdparties/sen2cor/2.8.0/Sen2Cor-02.08.00-Linux64.run \ + && bash Sen2Cor-02.08.00-Linux64.run && rm Sen2Cor-02.08.00-Linux64.run -f + +# Copy all required files from repo +COPY --chown=moringa aux_data /home/moringa/aux_data +COPY --chown=moringa *.py *.cfg /home/moringa/ \ No newline at end of file -- GitLab