Skip to content
Snippets Groups Projects
Dockerfile 3.78 KiB
Newer Older
# Copyright (c) 2012-2018 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Capgemini modified the first verion of this dockerfile
# for Biomass Project
# Contributors:
#   Red Hat, Inc. - initial API and implementation
#   Capgemini for Biomass project

FROM quay.io/eclipse/che-python-3.7:nightly

LABEL maintainer="teddy.kossoko@capgemini.com"
LABEL version="1.0"
LABEL description="Docker file based on ubuntu for eclipse-che workspaces for Biomass project"

edupin's avatar
edupin committed
USER root
RUN apt-get update \
 && apt-get install -y sudo


# this is where I was running into problems with the other approaches
edupin's avatar
edupin committed
#RUN sudo apt-get update 
edupin's avatar
edupin committed
RUN  apt-get update 
RUN  apt-get clean
# Installation of pip, gdal, python3, matplotlib, doxyen
# installation of scikit-learn, pandas, geopandas, fiona,  shapely

RUN  pip3 install --upgrade pip
edupin's avatar
edupin committed
RUN  sudo apt-get clean
RUN apt-get -y install sudo wget


RUN wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh 
RUN chmod +x Anaconda3-2020.02-Linux-x86_64.sh


RUN   apt-get install -y  --no-install-recommends  rsync software-properties-common python3-lxml python3-pip python3-dev gdal-bin libgdal-dev octave && \ 
edupin's avatar
edupin committed
       apt-get install -y libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 && \ 
      pip3 install scipy && \
edupin's avatar
edupin committed
apt-get -y install sudo wget unzip sqlite3 libsqlite3-dev && \
edupin's avatar
edupin committed
      pip3 install matplotlib && \
      pip3 install property && \
      pip install pillow && \
      pip install -U scikit-learn && \
      pip install pandas && \
      pip install --user fiona && \
      pip install Shapely && \
      pip install opencv-python && \
      pip install octave_kernel && \
edupin's avatar
edupin committed
      apt-get -y install doxygen  && \
      apt-get -y install jq && \
edupin's avatar
edupin committed
      pip3 install --upgrade pip && \
      apt-get -y install gcc && \
edupin's avatar
edupin committed
      apt-get -y install g++ && \
edupin's avatar
edupin committed
      add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable && \
      apt-get install gdal-bin && \
      apt-get install libgdal-dev && \
edupin's avatar
edupin committed
      pip install requests && \
edupin's avatar
edupin committed
      apt-get install -y unzip git curl && \      
      bash Anaconda3-2020.02-Linux-x86_64.sh -b -p $HOME/miniconda  && \
      export PATH="$HOME/miniconda/bin:$PATH" && \
      rm Anaconda3-2020.02-Linux-x86_64.sh && \
      git clone https://github.com/geopandas/geopandas.git && \
      cd geopandas && \
      pip install .
edupin's avatar
edupin committed

#RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
#RUN export C_INCLUDE_PATH=/usr/include/gdal

# installation of GDL
edupin's avatar
edupin committed
RUN  apt -y install gnudatalanguage

# We add the script folder and the zip file to be able to unzip the structure of the project
COPY initTemplate.sh /usr/bmap/initTemplate.sh
COPY initCredentials.sh /usr/bmap/initCredentials.sh
COPY Project_template.zip /usr/bmap/Project_template.zip
COPY shareAlgorithm.sh /usr/bmap/shareAlgorithm.sh
COPY .gitlab-ci.yml /usr/bmap/.gitlab-ci.yml


# We add the RestClient file
COPY RestClient.py /usr/bmap/RestClient.py
COPY quicklook_raster.py /usr/bmap/quicklook_raster.py
COPY ingestData.py /usr/bmap/ingestData.py
edupin's avatar
edupin committed
COPY ingestData.sh /usr/bmap/ingestData.sh
COPY OWSLib /usr/modules/OWSLib
edupin's avatar
edupin committed
COPY maap-s3.sh /usr/bmap/s3

RUN chmod a+rwx /usr/bmap/

RUN  chmod +x /usr/modules/OWSLib
edupin's avatar
edupin committed
RUN  chmod +x /usr/bmap/initTemplate.sh
RUN  chmod +x /usr/bmap/shareAlgorithm.sh
RUN  chmod +x /usr/bmap/ingestData.sh
edupin's avatar
edupin committed
RUN  chmod +x /usr/bmap/s3
ENV PATH="/usr/bmap/:${PATH}"
ENV PYTHONPATH="/usr/bmap/:${PYTHONPATH}"
ENV PATH="/usr/modules/:${PATH}"
ENV PYTHONPATH="/usr/modules/:${PYTHONPATH}"
#We add env variable to request the back end
ENV BMAP_BACKEND_URL=http://backend-val.biomass-maap.com/bmap-web/
edupin's avatar
edupin committed
#USER user