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

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
*~
*.swp
*.swo
*.whl
This diff is collapsed.
# Recipes and Scripts for Bob Maintenance
This package contains administration scripts for our wikis and the build
system. Use it and update it if you must.
## Basic conda installation
If you still don't have a basic conda installation, use `bootstrap-conda.sh` to
bootstrap a new installation:
```sh
$ ./bootstrap-conda.sh /opt/conda
```
The single parameter defines the prefix of the installation. You'll use this
prefix with the next commands. If everything is already in place, calling this
script only updates your conda root environment.
## From scratch
If you don't have any environment setup, or you want to have the current list
of packages updated, use the `from-scratch.sh` script. It builds an
environment pulling the latest versions of our dependencies from both the
`defaults` and `conda-forge` channels:
```sh
$ ./from-scratch.sh /opt/conda bob-devel-py27 2.7
```
The parameters are:
1. The base directory where the environment should be installed
2. The name of the environment to be created
3. The version of python to use for this environment
Once the environment is generated, you may generate the package list like this:
```sh
$ /opt/conda/bin/conda list -n bob-devel-py27 -e > devel-py27.txt
```
## From list
To create a fully functional environment from a file list, use the following:
```sh
$ ./from-list.sh /opt/conda bob-devel-py27 devel-py27.txt
```
The parameters are:
1. The base directory where the environment should be installed
2. The name of the environment to be created
3. The package list file to use for the newly created environment
#### Extra OS packages
Besides the dependencies encoded in `from-scratch.sh`, Bob development also
requires the following packages, you must procure for your own operating
system:
* git (required to checkout packages via `mr.developer`)
* LaTeX (required by matplotlib legends and sphinx documentation generation):
* texlive-latex-extra
* texlive-latex-recommended
* texlive-fonts-recommended
* dvipng
* gcc/clang compiler suite + standard c++ library
* On Linux, use gcc + libstdc++. These are normally distributed by
installing the gcc and/or g++ packages of your distribution
* On Mac OSX, use clang + libc++ (compatibility with `conda-forge`). Clang
and libc++ are distributed with XCode
#### Extra pip packages
From time to time, you'll need to install extra pip packages on your
environment. The most efficient way to manage those is to install by hand on
the environment, using `pip`, then generate a wheel that you'll upload to our
wheel repository for later serving. This wheels will work with the Conda
installation you'll use.
To generate these wheels and upload to our server, do:
```sh
$ ./extra-wheels.sh /opt/conda bob-devel-py27
$ ./extra-wheels.sh /opt/conda bob-devel-py34
$ ./extra-wheels.sh /opt/conda bob-devel-py35
$ ./upload-wheels.sh *.whl
password: *********
```
#!/usr/bin/env bash
# Wed 17 Aug 2016 13:50:09 CEST
if [ "${#}" != 1 ]; then
echo "usage: `basename $0` <prefix>"
echo "example: `basename $0` /opt/conda"
exit 1
fi
BASEDIR=$1
CONDA=${BASEDIR}/bin/conda
MINICONDA=${HOME}/Downloads/miniconda.sh
if [ "$(uname)" == "Darwin" ]; then
ARCH="MacOSX-x86_64"
else
ARCH="Linux-x86_64"
fi
if [ ! -x ${MINICONDA} ]; then
mkdir -pv `dirname ${MINICONDA}`
echo "[>>] Downloading `basename ${MINICONDA}` -> ${MINICONDA}..."
curl --progress-bar https://repo.continuum.io/miniconda/Miniconda3-latest-${ARCH}.sh --output ${MINICONDA}
chmod 755 ${MINICONDA}
fi
# Create root environment and add basic channels for conda
if [ ! -x ${CONDA} ]; then
echo "[>>] Creating root environment and setting basic options..."
bash ${MINICONDA} -b -p ${BASEDIR}
${CONDA} config --set show_channel_urls True
${CONDA} config --add channels conda-forge
fi
echo "[>>] Updating root environment..."
${CONDA} update --yes -n root conda
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
bzip2=1.0.6=3
alabaster=0.7.9=py27_0
babel=2.3.4=py27_0
backports.shutil_get_terminal_size=1.0.0=py27_0
blas=1.1=openblas
boost=1.61.0=py27_1
ca-certificates=2016.8.2=3
cairo=1.12.18=8
certifi=2016.8.2=py27_0
cmake=3.6.1=0
coverage=4.2=py27_0
curl=7.49.1=0
cycler=0.10.0=py27_0
cython=0.24.1=py27_0
decorator=4.0.10=py27_0
docopt=0.6.2=py27_0
expat=2.1.0=1
ffmpeg=2.8.6=2
fontconfig=2.11.1=3
freetype=2.6.3=1
functools32=3.2.3.2=py27_1
gettext=0.19.7=1
giflib=5.1.2=1
glib=2.48.0=4
harfbuzz=1.0.6=0
hdf5=1.8.17=2
icu=56.1=4
imagesize=0.7.1=py27_0
ipdb=0.10.1=py27_0
ipython=5.1.0=py27_0
jinja2=2.8=py27_1
jpeg=9b=0
jsoncpp=0.10.6=1
libarchive=3.2.1=2
libblitz=0.10=0
libffi=3.2.1=2
libiconv=1.14=3
libmatio=1.5.6=4
libpng=1.6.23=0
libsvm=3.21=1
libtiff=4.0.6=6
libxml2=2.9.4=0
markupsafe=0.23=py27_0
matplotlib=1.5.2=np111py27_6
ncurses=5.9=8
nose=1.3.7=py27_0
numexpr=2.6.1=np111py27_0
numpy=1.11.1=py27_blas_openblas_201
openblas=0.2.18=4
openssl=1.0.2h=2
pango=1.40.1=0
pathlib2=2.1.0=py27_0
pcre=8.38=1
pexpect=4.2.0=py27_1
pickleshare=0.7.3=py27_0
pillow=3.3.0=py27_0
pip=8.1.2=py27_0
pixman=0.32.6=0
pkg-config=0.28=1
prompt_toolkit=1.0.6=py27_0
psutil=4.3.0=py27_0
ptyprocess=0.5.1=py27_0
pygments=2.1.3=py27_1
pyparsing=2.1.7=py27_0
python=2.7.12=0
python-dateutil=2.5.3=py27_0
pytz=2016.6.1=py27_0
qt=4.8.7=0
readline=6.2=0
requests=2.11.0=py27_0
scikit-learn=0.17.1=np111py27_blas_openblas_201
scipy=0.18.0=np111py27_blas_openblas_201
setuptools=25.1.6=py27_0
simplegeneric=0.8.1=py27_0
sip=4.18=py27_0
six=1.10.0=py27_0
snowballstemmer=1.2.1=py27_0
sox=14.4.2=libpng1.6.23_6
sphinx=1.4.5=py27_0
sphinx_rtd_theme=0.1.9=py27_0
sqlite=3.13.0=1
tk=8.5.19=0
traitlets=4.2.2=py27_0
vlfeat=0.9.20=1
wcwidth=0.1.7=py27_0
wheel=0.29.0=py27_0
x264=20131217=1
xz=5.2.2=0
zlib=1.2.8=3
docutils=0.12=py27_2
ipython_genutils=0.1.0=py27_0
libgfortran=3.0.0=1
nomkl=1.0=0
pyqt=4.11.4=py27_4
sqlalchemy=1.0.13=py27_0
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
bzip2=1.0.6=3
alabaster=0.7.9=py34_0
babel=2.3.4=py34_0
backports.shutil_get_terminal_size=1.0.0=py34_0
blas=1.1=openblas
boost=1.61.0=py34_1
ca-certificates=2016.8.2=3
cairo=1.12.18=8
certifi=2016.8.2=py34_0
cmake=3.6.1=0
coverage=4.2=py34_0
curl=7.49.1=0
cycler=0.10.0=py34_0
cython=0.24.1=py34_0
decorator=4.0.10=py34_0
docopt=0.6.2=py34_0
expat=2.1.0=1
ffmpeg=2.8.6=2
fontconfig=2.11.1=3
freetype=2.6.3=1
gettext=0.19.7=1
giflib=5.1.2=1
glib=2.48.0=4
harfbuzz=1.0.6=0
hdf5=1.8.17=2
icu=56.1=4
imagesize=0.7.1=py34_0
ipdb=0.10.1=py34_0
ipython=5.1.0=py34_0
jinja2=2.8=py34_1
jpeg=9b=0
jsoncpp=0.10.6=1
libarchive=3.2.1=2
libblitz=0.10=0
libffi=3.2.1=2
libiconv=1.14=3
libmatio=1.5.6=4
libpng=1.6.23=0
libsvm=3.21=1
libtiff=4.0.6=6
libxml2=2.9.4=0
markupsafe=0.23=py34_0
matplotlib=1.5.2=np111py34_6
ncurses=5.9=8
nose=1.3.7=py34_0
numexpr=2.6.1=np111py34_0
numpy=1.11.1=py34_blas_openblas_201
openblas=0.2.18=4
openssl=1.0.2h=2
pango=1.40.1=0
pcre=8.38=1
pexpect=4.2.0=py34_1
pickleshare=0.7.3=py34_0
pillow=3.3.0=py34_0
pip=8.1.2=py34_0
pixman=0.32.6=0
pkg-config=0.28=1
prompt_toolkit=1.0.5=py34_0
psutil=4.3.0=py34_0
ptyprocess=0.5.1=py34_0
pygments=2.1.3=py34_1
pyparsing=2.1.7=py34_0
python=3.4.5=1
python-dateutil=2.5.3=py34_0
pytz=2016.6.1=py34_0
qt=4.8.7=0
readline=6.2=0
requests=2.11.0=py34_0
scikit-learn=0.17.1=np111py34_blas_openblas_201
scipy=0.18.0=np111py34_blas_openblas_201
setuptools=25.1.6=py34_0
simplegeneric=0.8.1=py34_0
sip=4.18=py34_0
six=1.10.0=py34_0
snowballstemmer=1.2.1=py34_0
sox=14.4.2=libpng1.6.23_6
sphinx=1.4.5=py34_0
sphinx_rtd_theme=0.1.9=py34_0
sqlite=3.13.0=1
tk=8.5.19=0
traitlets=4.2.2=py34_0
vlfeat=0.9.20=1
wcwidth=0.1.7=py34_0
wheel=0.29.0=py34_0
x264=20131217=1
xz=5.2.2=0
zlib=1.2.8=3
docutils=0.12=py34_2
ipython_genutils=0.1.0=py34_0
libgfortran=3.0.0=1
nomkl=1.0=0
pyqt=4.11.4=py34_4
sqlalchemy=1.0.13=py34_0
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
bzip2=1.0.6=3
alabaster=0.7.9=py35_0
babel=2.3.4=py35_0
backports.shutil_get_terminal_size=1.0.0=py35_0
blas=1.1=openblas
boost=1.61.0=py35_1
ca-certificates=2016.8.2=3
cairo=1.12.18=8
certifi=2016.8.2=py35_0
cmake=3.6.1=0
coverage=4.2=py35_0
curl=7.49.1=0
cycler=0.10.0=py35_0
cython=0.24.1=py35_0
decorator=4.0.10=py35_0
docopt=0.6.2=py35_0
expat=2.1.0=1
ffmpeg=2.8.6=2
fontconfig=2.11.1=3
freetype=2.6.3=1
gettext=0.19.7=1
giflib=5.1.2=1
glib=2.48.0=4
harfbuzz=1.0.6=0
hdf5=1.8.17=2
icu=56.1=4
imagesize=0.7.1=py35_0
ipdb=0.10.1=py35_0
ipython=5.1.0=py35_0
jinja2=2.8=py35_1
jpeg=9b=0
jsoncpp=0.10.6=1
libarchive=3.2.1=2
libblitz=0.10=0
libffi=3.2.1=2
libiconv=1.14=3
libmatio=1.5.6=4
libpng=1.6.23=0
libsvm=3.21=1
libtiff=4.0.6=6
libxml2=2.9.4=0
markupsafe=0.23=py35_0
matplotlib=1.5.2=np111py35_6
ncurses=5.9=8
nose=1.3.7=py35_0
numexpr=2.6.1=np111py35_0
numpy=1.11.1=py35_blas_openblas_201
openblas=0.2.18=4
openssl=1.0.2h=2
pango=1.40.1=0
pcre=8.38=1
pexpect=4.2.0=py35_1
pickleshare=0.7.3=py35_0
pillow=3.3.0=py35_0
pip=8.1.2=py35_0
pixman=0.32.6=0
pkg-config=0.28=1
prompt_toolkit=1.0.5=py35_0
psutil=4.3.0=py35_0
ptyprocess=0.5.1=py35_0
pygments=2.1.3=py35_1
pyparsing=2.1.7=py35_0
python=3.5.2=2
python-dateutil=2.5.3=py35_0
pytz=2016.6.1=py35_0
qt=4.8.7=0
readline=6.2=0
requests=2.11.0=py35_0
scikit-learn=0.17.1=np111py35_blas_openblas_201
scipy=0.18.0=np111py35_blas_openblas_201
setuptools=25.1.6=py35_0
simplegeneric=0.8.1=py35_0
sip=4.18=py35_0
six=1.10.0=py35_0
snowballstemmer=1.2.1=py35_0
sox=14.4.2=libpng1.6.23_6
sphinx=1.4.5=py35_0
sphinx_rtd_theme=0.1.9=py35_0
sqlite=3.13.0=1
tk=8.5.19=0
traitlets=4.2.2=py35_0
vlfeat=0.9.20=1
wcwidth=0.1.7=py35_0
wheel=0.29.0=py35_0
x264=20131217=1
xz=5.2.2=0
zlib=1.2.8=3
docutils=0.12=py35_2
ipython_genutils=0.1.0=py35_0
libgfortran=3.0.0=1
nomkl=1.0=0
pyqt=4.11.4=py35_4
sqlalchemy=1.0.13=py35_0
#!/usr/bin/env bash
# Wed 17 Aug 2016 13:50:05 CEST
# Set the versions here
CYVLFEAT="cyvlfeat==0.4.5"
MENPO="pathlib==1.0.1 menpo==0.7.3 menpofit==0.3.0"
if [ "${#}" != 2 ]; then
echo "usage: `basename $0` <basedir> <name>"
echo "example: `basename $0` /opt/conda bob-devel-py34"
exit 1
fi
echo "[>>] Activating conda environment ${2}..."
source ${1}/bin/activate ${2}
if [ "${?}" != 0 ]; then
echo "[error] Activating conda environment - check your settings"
exit 1
fi
echo "[>>] Generating wheels..."
CFLAGS="-I${CONDA_PREFIX}/include" LDFLAGS="-L${CONDA_PREFIX}/lib -lvl -Wl,-rpath=${CONDA_PREFIX}/lib" pip --no-cache-dir wheel --no-deps ${CYVLFEAT}
pip --no-cache-dir wheel --no-deps ${MENPO}
#!/usr/bin/env bash
# Wed 17 Aug 2016 13:50:09 CEST
if [ "${#}" != 3 ]; then
echo "usage: `basename $0` <basedir> <name> <list>"
echo "example: `basename $0` /opt/conda bob-devel-py34 devel-py34.txt"
exit 1
fi
BASEDIR=$1
NAME=$2
FILE=$3
CONDA=${BASEDIR}/bin/conda
if [ "$(uname)" == "Darwin" ]; then
ARCH="MacOSX-x86_64"
else
ARCH="Linux-x86_64"
fi
# Re-create the environment
if [ ! -d ${BASEDIR}/envs/${NAME} ]; then
${CONDA} create --yes -n ${NAME} --file ${FILE}
fi
#!/usr/bin/env bash
# Wed 17 Aug 2016 13:50:29 CEST
if [ "${#}" != 3 ]; then
echo "usage: `basename $0` <basedir> <name> <python-version>"
echo "example: `basename $0` /opt/conda bob-devel-py34 3.4"
exit 1
fi
BASEDIR=$1
NAME=$2
PYTHON_VERSION=$3
CONDA=${BASEDIR}/bin/conda
MINICONDA=${HOME}/Downloads/miniconda.sh
if [ ! -d ${BASEDIR}/envs/${NAME} ]; then
echo "[>>] Creating environment ${NAME} for python ${PYTHON_VERSION}..."
${CONDA} create --yes -n ${NAME} python=${PYTHON_VERSION}
fi
# For a complete list of dependencies, please read:
# https://gitlab.idiap.ch/bob/bob/wikis/Dependencies
echo "[>>] Installing Bob dependencies on ${NAME}..."
${CONDA} install --yes -n ${NAME} \
nomkl \
boost \
cmake \
coverage \
sphinx \
sphinx_rtd_theme \
cython \
docopt \
ffmpeg \
giflib \
hdf5 \
ipdb \
ipython \
jpeg \
libblitz \
libmatio \
libpng \
libsvm \
libtiff \
matplotlib \
nose \
numexpr \
numpy \
pillow \
pkg-config \
psutil \
scikit-learn \
scipy \
sox \
sqlalchemy \
vlfeat
echo "[>>] Bye!"
exit 0
#!/usr/bin/env bash
# Wed 17 Aug 2016 13:50:05 CEST
if [ "${#}" = 0 ]; then
echo "usage: `basename $0` <wheels>"
echo "example: `basename $0` *.whl"
exit 1
fi
SERVER=http://beatubulatest.lab.idiap.ch/software/bob/wheels-upload/gitlab/
echo -n "Username: "
read username
echo -n "Password: "
read -s password
echo ""
curl_uploads=""
for wheel in ${@}; do
echo "[>>] Uploading ${wheel}..."
curl --silent --user "${username}:${password}" --insecure --upload-file ${wheel} ${SERVER}
if [ $? != 0 ]; then
echo "[error] curl command finished with an error condition"
exit 1
fi
done
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