Dockerfile.shark3.1.4 3.56 KB
Newer Older
1
FROM ubuntu:18.04 as shark-provider
2
MAINTAINER OrfeoToolbox Core Team
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93

ENV DEBIAN_FRONTEND noninteractive

# ----------------------------------------------------------------------------
# First stage : install tools 
# (based on https://github.com/Shark-ML/Shark/blob/master/.travis.yml)
# ----------------------------------------------------------------------------

RUN apt-get update -y \
  && apt-get upgrade -y \
  && apt-get install -y --no-install-recommends \
        ca-certificates \
        g++ \
        make \
        cmake \
        libboost-date-time-dev \
        libboost-filesystem-dev \
        libboost-graph-dev \
        libboost-program-options-dev \
        libboost-system-dev \
        libboost-thread-dev \
        libcurl4-gnutls-dev \
        curl \
  && rm -rf /var/lib/apt/lists/*

RUN cd \tmp \
  && curl -o shark.tar.gz https://codeload.github.com/Shark-ML/Shark/tar.gz/v3.1.4 \
  && tar xzf shark.tar.gz \
  && cd Shark-3.1.4\
  && mkdir build \
  && cd build \
  && cmake  -DBUILD_EXAMPLES:BOOL=OFF \
            -DBUILD_TESTING:BOOL=OFF \
            -DENABLE_HDF5:BOOL=OFF \
            -DBUILD_SHARED_LIBS=ON \
            -DENABLE_CBLAS:BOOL=OFF \
            -DENABLE_OPENMP:BOOL=OFF \
            ../. \
  && make install

FROM ubuntu:18.04
MAINTAINER Sebastien Dinot <sebastien.dinot@c-s.fr>

ENV DEBIAN_FRONTEND noninteractive

RUN echo "Europe/Paris" > /etc/timezone

# ----------------------------------------------------------------------------
# First stage : install tools (they rarely evolve)
# ----------------------------------------------------------------------------
RUN apt-get update -y \
 && apt-get upgrade -y \
 && apt-get install -y --no-install-recommends \
        ca-certificates \
        curl \
        make \
        cmake \
        ninja-build \
        g++ \
        gcc \
        clang \
        clang-tidy \
        clang-format \
        ccache \
        git \
        libtool \
        swig \
        xvfb \
 && rm -rf /var/lib/apt/lists/*

# ----------------------------------------------------------------------------
# Second stage : dependencies (they evolve more often)
# ----------------------------------------------------------------------------

RUN apt-get update -y \
 && apt-get upgrade -y \
 && apt-get install -y --no-install-recommends \
        freeglut3-dev \
        libboost-date-time-dev \
        libboost-filesystem-dev \
        libboost-graph-dev \
        libboost-program-options-dev \
        libboost-system-dev \
        libboost-thread-dev \
        libcurl4-gnutls-dev \
        libexpat1-dev \
        libfftw3-dev \
        libgdal-dev \
        libgeotiff-dev \
        libglew-dev \
        libglfw3-dev \
94
        libgsl-dev \
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
        libinsighttoolkit4-dev \
        libkml-dev \
        libmuparser-dev \
        libmuparserx-dev \
        libopencv-core-dev \
        libopencv-ml-dev \
        libopenmpi-dev \
        libopenthreads-dev \
        libossim-dev \
        libpng-dev \
        libqt5opengl5-dev \
        libqwt-qt5-dev \
        libsvm-dev \
        libtinyxml-dev \
        qtbase5-dev \
        qttools5-dev \
111
        default-jdk \
112 113 114 115 116 117 118 119 120 121 122 123 124 125
        python-dev \
        python-numpy \
        python-gdal \
        python3-dev \
        python3-numpy \
        python3-gdal \
 && rm -rf /var/lib/apt/lists/*

COPY --from=shark-provider /usr/local/include/shark/* /usr/include/shark/
COPY --from=shark-provider /usr/local/lib/libshark* /usr/lib/
COPY --from=shark-provider /usr/local/bin/SharkVersion /usr/bin/
COPY --from=shark-provider /usr/local/lib/cmake/ /usr/lib/cmake/

ENV PATH /usr/lib/ccache:$PATH
126
ENV OTB_USE_SHARK ON