Commit bb7932d2 authored by Philip ABBET's avatar Philip ABBET

Setup of the 1.0.0 branch

parent 4b9738fa
Pipeline #8840 failed with stage
in 8 seconds
[submodule "scripts"]
path = scripts
url = git@gitlab.idiap.ch:beat/beat.env.scripts.git
###############################################################################
# #
# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ #
# Copyright (c) 2017 Idiap Research Institute, http://www.idiap.ch/ #
# Contact: beat.support@idiap.ch #
# #
# This file is part of the beat.backend.python module of the BEAT platform. #
# This file is part of the beat.env.python module of the BEAT platform. #
# #
# Commercial License Usage #
# Licensees holding valid commercial BEAT licenses may use this file in #
......@@ -23,58 +23,78 @@
###############################################################################
FROM debian:8.4
MAINTAINER Andre Anjos <andre.anjos@idiap.ch>
MAINTAINER Philip Abbet <philip.abbet@idiap.ch>
# the destination directory that will contain the 'execute' environment
ARG destdir=/usr/local/beat
ADD Miniconda2-latest-Linux-x86_64.sh /tmp
# the tarball containing the environment, with a Makefile that can build it
ARG tarball
SHELL ["/bin/bash", "-c"]
ADD $tarball $destdir
# Change the PATH, so we can execute the scripts easily
ENV PATH /opt/miniconda2/bin:/usr/local/bin/beat:$PATH
# Install the needed packages
RUN set -ex \
&& build_deps=' \
cmake \
dh-autoreconf \
gcc \
gfortran \
libatlas-dev \
libc-dev \
libfreetype6-dev \
libgomp1 \
libjpeg-dev \
liblapack-dev \
libpq-dev \
libreadline-dev \
make \
pkg-config \
unzip \
wget \
' \
# Install the needed packages
&& apt-get update \
&& apt-get install -y $build_deps \
&& apt-get install -y bzip2 git \
&& apt-get clean \
# building of the content of the tarball
&& make -C $destdir download \
&& make -C $destdir \
&& rm -rf $destdir/pkg $destdir/log \
# 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 \
&& conda create -y -n beat_env python=2.7 \
# remove the packages no longer needed, and add some runtime-only ones
&& set -ex \
&& runtime_deps=' \
libatlas3-base \
libffi6 \
libfreetype6 \
libjpeg62-turbo \
libreadline6 \
' \
&& apt-get purge -y --auto-remove $build_deps \
&& apt-get install -y $runtime_deps \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install the needed packages
&& source activate beat_env \
&& conda install -y gevent \
# 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 \
&& conda clean -y -a \
# Install the beat packages
&& pip install -e git+https://gitlab.idiap.ch/beat/beat.backend.python.git@v1.1.6#egg=beat.backend.python \
# change the PATH, so we can execute the scripts easily
ENV PATH $destdir/bin:$PATH
# Create the wrapper scripts for the executables
&& mkdir /usr/local/bin/beat \
&& printf '#! /bin/bash\n\nsource activate beat_env\ndescribe $1 $2\n' > /usr/local/bin/beat/describe \
&& printf '#! /bin/bash\n\nsource activate beat_env\nexecute $1 $2 $3\n' > /usr/local/bin/beat/execute \
&& chmod 755 /usr/local/bin/beat/describe \
&& chmod 755 /usr/local/bin/beat/execute \
# Customisation of the environment name
&& mkdir /etc/beat \
&& printf "{\n \"name\": \"Scientific Python 2.7\",\n \"version\": \"1.0.0\"\n}\n" > /etc/beat/environment.json \
# Cleanup
&& 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
This diff is collapsed.
......@@ -9,7 +9,7 @@ backend of the BEAT platform.
To test the creation of a container on your machine, run the following command:
```sh
$ ./build.sh
$ docker build --rm=true -t docker.idiap.ch/beat/beat.env.python:1.0.0 .
```
......
#!/usr/bin/env bash
# Default values
PROJECT_REPOSITORY=git@gitlab.idiap.ch:beat/beat.env.python27
PROJECT_BRANCH=v0.1.0
IMAGE_NAME=beat.env.python
IMAGE_TAG=0.1.0
REGISTRY=docker.idiap.ch/beat
# Customisation from the command-line, used mainly by the CI
if [ $# != 0 ]; then
IFS=:
read image_fullname IMAGE_TAG <<< "$1"
REGISTRY=${image_fullname%/*}
IMAGE_NAME=${image_fullname##*/}
fi
if [ $# == 2 ]; then
PROJECT_REPOSITORY="https://${2}@gitlab.idiap.ch/${PROJECT_REPOSITORY##*:}"
fi
# Build the image (in three steps)
./scripts/build.sh "${PROJECT_REPOSITORY}" $PROJECT_BRANCH $IMAGE_NAME $IMAGE_TAG $REGISTRY
Subproject commit ea1fb21701b79f2b05c1d07916750a1781a12ea4
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment