Dockerfile 4.31 KB
Newer Older
Philip ABBET's avatar
Philip ABBET committed
1 2
###############################################################################
#                                                                             #
Philip ABBET's avatar
Philip ABBET committed
3
# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/           #
Philip ABBET's avatar
Philip ABBET committed
4 5
# Contact: beat.support@idiap.ch                                              #
#                                                                             #
Philip ABBET's avatar
Philip ABBET committed
6
# This file is part of the beat.env.python module of the BEAT platform.       #
Philip ABBET's avatar
Philip ABBET committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#                                                                             #
# Commercial License Usage                                                    #
# Licensees holding valid commercial BEAT licenses may use this file in       #
# accordance with the terms contained in a written agreement between you      #
# and Idiap. For further information contact tto@idiap.ch                     #
#                                                                             #
# Alternatively, this file may be used under the terms of the GNU Affero      #
# Public License version 3 as published by the Free Software and appearing    #
# in the file LICENSE.AGPL included in the packaging of this file.            #
# The BEAT platform is distributed in the hope that it will be useful, but    #
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY  #
# or FITNESS FOR A PARTICULAR PURPOSE.                                        #
#                                                                             #
# You should have received a copy of the GNU Affero Public License along      #
# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
#                                                                             #
###############################################################################

25
FROM debian:8.4
Philip ABBET's avatar
Philip ABBET committed
26
MAINTAINER Philip Abbet <philip.abbet@idiap.ch>
Philip ABBET's avatar
Philip ABBET committed
27

Philip ABBET's avatar
Philip ABBET committed
28
ADD Miniconda2-latest-Linux-x86_64.sh /tmp
Philip ABBET's avatar
Philip ABBET committed
29

Philip ABBET's avatar
Philip ABBET committed
30
SHELL ["/bin/bash", "-c"]
Philip ABBET's avatar
Philip ABBET committed
31

Philip ABBET's avatar
Philip ABBET committed
32 33
# Change the PATH, so we can execute the scripts easily
ENV PATH /opt/miniconda2/bin:/usr/local/bin/beat:$PATH
Philip ABBET's avatar
Philip ABBET committed
34

35
RUN set -ex \
Philip ABBET's avatar
Philip ABBET committed
36
      # Install the needed packages
37
      && apt-get update \
Philip ABBET's avatar
Philip ABBET committed
38
      && apt-get install -y bzip2 git \
39
      && apt-get clean \
40

Philip ABBET's avatar
Philip ABBET committed
41 42 43 44 45
      # Install miniconda and create the environment
      && cd /tmp \
      && bash Miniconda2-latest-Linux-x86_64.sh -b -p /opt/miniconda2 \
      && conda config --add channels defaults \
      && conda config --add channels https://www.idiap.ch/software/bob/conda \
46

Philip ABBET's avatar
Philip ABBET committed
47
      # Install the needed packages
Philip ABBET's avatar
Philip ABBET committed
48
      && conda install -y \
49
          python=2.7 \
Philip ABBET's avatar
Philip ABBET committed
50 51 52 53 54
          opencv=3.1.0 \
          numpy=1.12.1 \
          scipy=0.19.0 \
          scikit-learn=0.18.1 \
          scikit-image=0.13.0 \
Philip ABBET's avatar
Philip ABBET committed
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

      # Install bob
      && conda install -y \
          bob.ap=2.1.2 \
          bob.blitz=2.0.12 \
          bob.core=2.1.7 \
          bob.extension=2.3.9 \
          bob.io.audio=2.0.4 \
          bob.io.base=2.0.13 \
          bob.io.image=2.2.1 \
          bob.io.matlab=2.0.8 \
          bob.io.video=2.0.14 \
          bob.ip.base=2.0.14 \
          bob.ip.color=2.0.8 \
          bob.ip.draw=2.0.7 \
          bob.ip.facedetect=2.1.2 \
          bob.ip.flandmark=2.1.4 \
          bob.ip.gabor=2.0.9 \
          bob.ip.optflow.hornschunck=2.0.11 \
          bob.ip.optflow.liu=2.0.10 \
          bob.learn.activation=2.0.8 \
          bob.learn.boosting=2.0.11 \
          bob.learn.em=2.0.12 \
          bob.learn.libsvm=2.0.10 \
          bob.learn.linear=2.1.0 \
          bob.learn.mlp=2.1.4 \
          bob.math=2.1.0 \
          bob.measure=2.3.0 \
          bob.sp=2.0.8 \

      # Install the beat packages
86
      && pip install -e git+https://gitlab.idiap.ch/beat/beat.backend.python.git@v1.4.1#egg=beat.backend.python \
87

Philip ABBET's avatar
Philip ABBET committed
88 89
      # Create the wrapper scripts for the executables
      && mkdir /usr/local/bin/beat \
90 91
      && printf '#! /bin/bash\n\ndescribe $1 $2\n' > /usr/local/bin/beat/describe \
      && printf '#! /bin/bash\n\nexecute $1 $2 $3\n' > /usr/local/bin/beat/execute \
Philip ABBET's avatar
Philip ABBET committed
92 93 94 95
      && chmod 755 /usr/local/bin/beat/describe \
      && chmod 755 /usr/local/bin/beat/execute \

      # Cleanup
Philip ABBET's avatar
Philip ABBET committed
96
      && conda clean -y -a \
Philip ABBET's avatar
Philip ABBET committed
97 98 99 100
      && apt-get purge -y --auto-remove git \
      && apt-get clean \
      && rm -rf /var/lib/apt/lists/* \
      && rm -rf /tmp/Miniconda2-latest-Linux-x86_64.sh
101 102 103

# Customisation of the environment
ADD environment.json /etc/beat/