Skip to content
Snippets Groups Projects
Commit 9b4d916d authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Simple CI

parent 67e58a06
No related branches found
No related tags found
1 merge request!2Ci2
Pipeline #
../src/bob.db.iris/doc/plot/iris_lda.py
\ No newline at end of file
../src/bob.db.iris/doc/plot/iris_lda_roc.py
\ No newline at end of file
../src/bob.ip.flandmark/doc/plot/show_lena.py
\ No newline at end of file
../src/bob.ip.gabor/doc/plot/similarity.py
\ No newline at end of file
../src/bob.ip.base/doc/plot/sobel.py
\ No newline at end of file
../src/bob.ip.gabor/doc/plot/transform.py
\ No newline at end of file
../src/bob.ip.gabor/doc/plot/wavelet.py
\ No newline at end of file
bob.extension
bob.blitz
bob.core
bob.io.base
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
# Tue Apr 24 18:55:40 CEST 2012
# This file contains the python (distutils/setuptools) instructions so your
# package can be installed on **any** host system. It defines some basic
# information like the package name for instance, or its homepage.
#
# It also defines which other packages this python package depends on and that
# are required for this package's operation. The python subsystem will make
# sure all dependent packages are installed or will install them for you upon
# the installation of this package.
#
# The 'buildout' system we use here will go further and wrap this package in
# such a way to create an isolated python working environment. Buildout will
# make sure that dependencies which are not yet installed do get installed, but
# **without** requiring administrative privileges on the host system. This
# allows you to test your package with new python dependencies w/o requiring
# administrative interventions.
from setuptools import setup, find_packages
requeriments = [l.rstrip("\n") for l in open("requirements-bob.txt", 'r').readlines()]
#requeriments = requeriments + [l.rstrip("\n") for l in open("requirements-satellites.txt", 'r').readlines()]
# The only thing we do in this file is to call the setup() function with all
# parameters that define our package.
setup(
# This is the basic information about your project. Modify all this
# information before releasing code publicly.
name='bob.nightlies',
version='0.0.1',
description='Bob is a free signal-processing and machine learning toolbox originally developed by the Biometrics group at Idiap Research Institute, in Switzerland.',
url='http://idiap.github.io/bob/',
license='BSD',
author='IDIAP Biometrics Group',
author_email='biometric@idiap.ch',
long_description=open('README.rst').read(),
# This line is required for any distutils based packaging.
packages=find_packages(),
include_package_data=True,
zip_safe=False,
# This line defines which packages should be installed when you "install"
# this package. All packages that are mentioned here, but are not installed
# on the current system will be installed locally and only visible to the
# scripts of this package. Don't worry - You won't need administrative
# privileges when using buildout.
install_requires=["setuptools"] + requeriments,
classifiers = [
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: BSD License',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
],
)
# Warnings that should be suppressed at Buildbot - no solution for those...
.* : .*arg is not a Python function.*
.* : ^\s*1.*This is a warning message.*
.* : .*LaTeX Warning:\s+.*
.* : .*Package\s+\S+\s+Warning:.*
.* : .*unusable reference target found: \.\./\.\./doxygen/html/index.html.*
.* : .*no files found matching '\*\.sql3' under directory 'bob'.*
.* : .*dereferencing type-punned pointer will break strict-aliasing rules.*
.*: .*: .*standard file.*-c.*not found.*
.*: .*no previously-included files matching .* found anywhere in distribution.*
.*: WARNING: duplicate citation .*, other instance in.*
#!/bin/bash
# Manuel Gunther <siebenkopf@googlemail.com>
# Thu Dec 3 10:41:06 MST 2015
# parameters:
# - BUILD_DEPENDENCIES (0: off, 1: basics, 2: +py3, 3: +utils)
BUILD_DEPENDENCIES=0
# - VERSIONS the pythobn versions that you want; the py27-debug requires the externals directory in /idiap/group/torch5spro/externals
VERSIONS="py27 py27-debug py34"
# - LAYERS the layers of bob.nigtlies to install
LAYERS="0 1 2"
# - PARALLEL the number of parallel threads to use (only for bob packages)
PARALLEL=4
# - SERVER where bob.nightlies files can be found
SERVER=https://gitlab.idiap.ch/biometric/bob.nightlies/raw/master/
# FIRST, make sure that all the dependencies are installed
# this needs sudo permissions, but can be left out, when these dependencies are already installed
if [ $BUILD_DEPENDENCIES -gt 0 ]; then
sudo add-apt-repository ppa:biometrics/bob
sudo apt-get update
sudo apt-get install wget git-core pkg-config cmake python-dev python-support python-pip python-virtualenv liblapack-dev libatlas-base-dev libblitz1-dev libavformat-dev libavcodec-dev libswscale-dev libboost-all-dev libmatio-dev libjpeg8-dev libnetpbm10-dev libpng12-dev libtiff4-dev libgif-dev libhdf5-serial-dev libfftw3-dev texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended libsvm-dev libvl-dev dvipng python-numpy python-scipy dvipng libopencv-dev ccache libsox-dev
fi
# for python3 you'll need extra:
if [ $BUILD_DEPENDENCIES -gt 1 ]; then
sudo apt-get install python3-dev
fi
# a good idea is:
if [ $BUILD_DEPENDENCIES -gt 2 ]; then
sudo apt-get install hdf5-tools hdfview kdiff3
fi
# SECOND: get information from server, if not there yet
# - virtual_build.sh
if [ ! -f virtual-build.sh ]; then
wget --no-check-certificate $SERVER/tools/virtual-build.sh
chmod u+x virtual-build.sh
fi
# - the requirements files of the layers
#for l in ${LAYERS}; do
# if [ ! -f requirements${l}.txt ]; then
# wget --no-check-certificate $SERVER/requirements${l}.txt
# fi
#done
if [ ! -f requirements.txt ]; then
wget --no-check-certificate $SERVER/requirements.txt
fi
# THIRD create bob-stable-$DATE directory
DATE=`date +%Y-%m-%d`
DIR="bob-stable-${DATE}"
# external requirements, which will be installed using pip before installing Bob packages
# (not for the py27-debug build, though)
echo -e "nose" > forced_requirements.txt
echo -e "numpy\nscipy\nmatplotlib\nsqlalchemy\nsix\ncoveralls\ngridtk\nmr.developer\nipdb\nsphinx" > extra_requirements.txt
status=0
# run virtual build for the desired python versions
for v in ${VERSIONS}; do
if [ ! -d $DIR/${v} ]; then
mkdir -p $DIR/${v}/logs
fi
if [ "$v" == "py27-debug" ]; then
# for py27-debug, we use the externals created in /idiap/group/torch5spro/externals/py27-debug/usr, which include a pre-compiled python version in debug mode
o=debug
export BOB_PREFIX_PATH=/idiap/group/torch5spro/externals/${v}/usr
exe="-x $BOB_PREFIX_PATH/bin/virtualenv"
python=""
else
# for release builds, we do not need any externals, but we need to install other python dependencies
o=release
exe=""
python=${v:0:3}.${v:3}
python="-P /usr/bin/${python/py/python}"
# first, build other dependencies like numpy, scipy, coveralls, ...
./virtual-build.sh -r forced_requirements.txt -o ${o} -d $DIR/${v} ${python} -u -F | tee ${DIR}/${v}/logs/BOB_${v}_forced_install.log
status=$?
if [ ${status} != 0 ]; then
echo "Installation of forced requirements failed; aborting"$
exit 1
fi
./virtual-build.sh -r extra_requirements.txt -o ${o} -d $DIR/${v} ${python} -uW | tee ${DIR}/${v}/logs/BOB_${v}_extra_install.log
status=$?
if [ ${status} != 0 ]; then
echo "Installation of extra requirements failed; aborting"
exit 1
fi
fi
# For all builds, we run through the requested layers and install all Bob packages
# For newer pip versions, caching is used, which we DISABLE here (as all packages need to be compiled freshly when the API of dependent packages has changed)
#for l in ${LAYERS}; do
# ./virtual-build.sh -r requirements${l}.txt -o ${o} -d $DIR/${v} -p ${PARALLEL} ${exe} ${python} -iC | tee ${DIR}/${v}/logs/BOB_${v}_layer${l}_install.log
# status=$?
# if [ ${status} != 0 ]; then
# echo "Installation of layer ${l} failed; aborting"
# exit 1
# fi
#done
./virtual-build.sh -r requirements.txt -o ${o} -d $DIR/${v} -p ${PARALLEL} ${exe} ${python} -iC | tee ${DIR}/${v}/logs/BOB_${v}_install.log
status=$?
if [ ${status} != 0 ]; then
echo "Installation failed; aborting"
exit 1
fi
done
# FINALLY, when everything succeeded:
# - link the new release
if [ -h bob-stable ]; then
unlink bob-stable
fi
ln -s $DIR bob-stable
# - cleanup
#rm -f virtual-build.sh requirements0.txt requirements1.txt requirements2.txt forced_requirements.txt extra_requirements.txt
rm -f virtual-build.sh requirements.txt forced_requirements.txt extra_requirements.txt
#!/bin/bash
# Andre Anjos <andre.anjos@idiap.ch>
# Tue 28 Aug 2012 11:34:25 CEST
if [ $# = 0 ]; then
echo "usage: $0 destination-directory"
exit 1
fi
basedir=`python -c "import os; print os.path.dirname(os.path.dirname(os.path.abspath('$0')))"`
dest=`python -c "import os; print os.path.abspath('$1')"`
if [ ! -d ${dest} ]; then
echo "Creating destination directory ${dest}...";
mkdir -v -p ${dest};
fi
# package all submodules
echo "Creating packages..."
git submodule foreach `pwd`/bin/python setup.py sdist --formats=zip
echo "Copying packages to ${dest}..."
git submodule foreach "cp -va dist/*.zip ${dest}"
#!/bin/bash
# Manuel Guenther <manuel.guenther@idiap.ch>
# Wed 7 Jan 19:25:56 CET 2015
if [ $# == 0 ]; then
echo "usage: $0 directory [directory] [...]"
echo "e.g. $0 layers/0/bob.io.base layers/1/bob.ip.base ..."
echo "or: $0 all"
exit 1
fi
if [ "$1" == "all" ]; then
# generate overall plot for all packages
echo "bin/bob_dependecy_graph.py -P requirements*.txt -W x.dot -v -X"
bin/bob_dependecy_graph.py -P requirements*.txt -W x.dot -v -X
else
# generate dependency graph for each of the given directories
while [ $# != 0 ]; do
directory=$1
shift
if [ -d $directory ]; then
package=`basename "$directory"`
echo "bin/bob_dependecy_graph.py -p $package -X -w $directory/dependencies.png -v"
bin/bob_dependecy_graph.py -p $package -X -w $directory/dependencies.png -v
fi
done
fi
#!/bin/bash
# Andre Anjos <andre.anjos@idiap.ch>
# Tue 03 Jun 2014 11:45:19 CEST
# Builds a virtualenv with all packages in layer2, downloaded from
# some webserver (could be PyPI)
# Requirement: virtualenv *should* be installed with the base framework
# pre-compiled (e.g. NumPy, SciPy, Matplotlib, etc.), to avoid unnecessary time
# spent on compiling trivialities.
# Usage info
show_help() {
cat << EOF
Usage: ${0##*/} [-r requirements] [-x externals] [-f find-links]
[-d folder] [-o debug/release] [-p threads] [-P python] [-h] [-i] [-u] [-F] [-C] [-W]
Creates a virtual environment, basing itself on the given externals area.
Pre-populates the virtual environment with the package list provided, if
one is given.
-h display this help and exit
-r FILE use the following requirements file to extra packages to install
-x EXE use the virtualenv executable pointed by this flag instead of the
default one
-f URL find packages for installation on this URL
-d DIR create the new virtual environment on this directory
-o debug/release compiles the Source code in debug or release mode
(default: release)
-p INT If specified, Bob will be compiled with the given number of parallel
threads
-P EXE If specified, uses the given python to initialize the virtualenv
-i ignore installation errors and keep going
-u upgrade the given requirements
-F forces the installation of a certain package
-C does not use cached elements
-W does not use wheels
EOF
}
requirements=""
virtualenv="virtualenv"
find_links=""
directory=""
optimize="release"
parallel=""
python=""
upgrade=""
ignore=0
force=""
nocache=0
nowheel=0
while getopts "hr:x:f:d:o:p:P:iuFCW" opt; do
case "$opt" in
h)
show_help
exit 0
;;
r) requirements=$OPTARG
;;
x) virtualenv=$OPTARG
;;
f) find_links=$OPTARG
;;
d) directory=$OPTARG
;;
o) optimize=$OPTARG
;;
p) parallel=$OPTARG
;;
P) python="-p $OPTARG"
;;
i) ignore=1
;;
u) upgrade="--upgrade"
;;
F) force="--force-reinstall"
;;
C) nocache=1
;;
W) nowheel=1
;;
'?')
show_help >&2
exit 1
;;
esac
done
# Prepares the new virtual environment
tmpdir=""
if [ -z "${directory}" ]; then
tmpdir=`mktemp --tmpdir -d ${0##*/}.XXXXXX`
directory=${tmpdir}
echo "Installing on temporary directory \`${directory}'..."
fi
if [ ! -d ${directory}/bin ]; then
echo "Initializing virtual environment at \`${directory}'..."
${virtualenv} ${python} ${directory}
${directory}/bin/pip install --upgrade setuptools pip
else
echo "Skipped virtual environment initialization at \`${directory}'"
fi
if [ "${optimize}" == "release" ]; then
echo "Setting RELEASE flags"
export CFLAGS="-O3 -g0 -mtune=generic"
export CXXFLAGS="-O3 -g0 -mtune=generic"
else
echo "Setting DEBUG flags"
export CFLAGS='-O0 -g -DBOB_DEBUG -DBZ_DEBUG'
export CXXFLAGS='-O0 -g -DBOB_DEBUG -DBZ_DEBUG'
fi
if [ -n "${parallel}" ]; then
echo "Using ${parallel} parallel threads for compilation"
export BOB_BUILD_PARALLEL=${parallel}
fi
# Installs all components listed the requirements file
if [ -n "${requirements}" ]; then
pip_opt="--verbose --pre"
if [ -n "${find_links}" ]; then
pip_opt="--find-links=${find_links} --no-index ${pip_opt}"
fi
if [ ${nocache} == 1 ]; then
pip_opt="--no-cache-dir ${pip_opt}"
fi
if [ ${nowheel} == 1 ]; then
pip_opt="--no-use-wheel ${pip_opt}"
fi
echo "Installing all requirements in \`${requirements}'..."
for req in `cat ${requirements}`; do
echo "Installing \`${req}'..."
${directory}/bin/pip install ${upgrade} ${force} ${pip_opt} "${req}"
status=$?
if [ ${ignore} == 0 -a ${status} != 0 ]; then
echo "Installation of package ${req} failed; aborting"
exit ${status}; fi
done
fi
# Removes temporary directory if one was created
if [ -n "${tmpdir}" ]; then
echo "Removing temporary directory \`${directory}'..."
rm -rf ${tmpdir}
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment