From 8d0b68e2f118c410e439b5dd448400cc504a109c Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.anjos@idiap.ch>
Date: Mon, 13 Mar 2017 09:29:54 +0100
Subject: [PATCH] Use a proper conda environment for describing the dev
 requirements (see bob/bob.conda#24)

---
 install/bob-devel.yml   | 58 ++++++++++++++++++++++++++++
 install/from-scratch.sh | 83 +----------------------------------------
 2 files changed, 59 insertions(+), 82 deletions(-)
 create mode 100644 install/bob-devel.yml

diff --git a/install/bob-devel.yml b/install/bob-devel.yml
new file mode 100644
index 0000000..2eaa4c7
--- /dev/null
+++ b/install/bob-devel.yml
@@ -0,0 +1,58 @@
+name: bob-devel
+channels:
+- defaults
+- https://www.idiap.ch/software/bob/conda
+dependencies:
+- caffe # [only linux]
+- anaconda=4.2.0 # [only linux]
+- anaconda=4.3.0 # [only osx]
+- boost=1.61
+- cmake
+- coverage
+- cython
+- cyvlfeat=0.4.5
+- dask
+- docopt
+- ffmpeg=2.8.10
+- gcc=4.8.5 # [only linux]
+- giflib=5.1.4
+- hdf5
+- ipdb=0.10.2
+- ipython
+- jpeg
+- libblitz=0.10
+- libgcc=4.8.5 # [only linux]
+- libmatio=1.5
+- libpng
+- libsvm=3.21
+- libtiff
+- matplotlib
+- menpo=0.7.7
+- menpofit=0.4.1
+- menpowidgets=0.2.1p3
+- mne=0.13.1
+- nose
+- numexpr
+- numpy
+- openblas=0.2.19
+- opencv=3
+- pillow
+- pip
+- pkg-config
+- pkgtools=0.7.3
+- psutil
+- pyedflib=0.1.6
+- python
+- schema=0.6.5
+- scikit-image
+- scikit-learn
+- scipy
+- sox=14.4.2
+- sphinx
+- sphinx_rtd_theme
+- sqlalchemy
+- toolchain=2.3.1
+- vlfeat=0.9.20
+- zc.buildout
+- pip:
+  - tensorflow==1.0.0
diff --git a/install/from-scratch.sh b/install/from-scratch.sh
index 255c47c..4c07110 100755
--- a/install/from-scratch.sh
+++ b/install/from-scratch.sh
@@ -22,88 +22,7 @@ if [ -d ${BASEDIR}/envs/${NAME} ]; then
   fi
 fi
 
-if [ "$(uname)" == "Linux" ] && [ ${PYTHON_VERSION} == "2.7" ]; then
-    CAFFE=caffe
-else
-    CAFFE=
-fi
-
-if [ "$(uname)" == "Linux" ]; then
-    TENSORFLOW=tensorflow
-    MYGCCPACKAGE="gcc=4.8.5"
-    MYLIBGCCPKG="libgcc=4.8.5"
-    ANACONDA="anaconda=4.2.0"
-else
-    TENSORFLOW=
-    MYGCCPACKAGE=
-    MYLIBGCCPKG=
-    ANACONDA="anaconda=4.3.0"
-fi
-
-# For a complete list of dependencies, please read:
-# https://gitlab.idiap.ch/bob/bob/wikis/Dependencies
-
-# the dependencies that come before anaconda are being pulled and pinned using
-# anaconda. When you update to a new version of anaconda make sure the
-# dependencies are still in the newer version of anaconda. If they are not
-# there anymore, you need to pin them if we still need them. Otherwise, remove
-# them from here too.
-
 echo "[>>] Creating environment ${NAME} for python ${PYTHON_VERSION} with bob dependencies..."
-${CONDA} create --copy --yes -n ${NAME} \
-  --override-channels \
-  -c http://www.idiap.ch/software/bob/conda \
-  -c defaults \
-  python=$PYTHON_VERSION \
-  cython \
-  dask \
-  hdf5 \
-  jpeg \
-  libpng \
-  libtiff \
-  matplotlib \
-  nose \
-  numexpr \
-  numpy \
-  pillow \
-  pip \
-  psutil \
-  scikit-image \
-  scikit-learn \
-  scipy \
-  sphinx \
-  sqlalchemy \
-  ${ANACONDA} \
-  boost=1.61 \
-  ${CAFFE} \
-  cmake \
-  coverage \
-  cyvlfeat=0.4.5 \
-  docopt \
-  ffmpeg=2.8.10 \
-  ${MYGCCPACKAGE} \
-  ${MYLIBGCCPKG} \
-  giflib=5.1.4 \
-  ipdb=0.10.2 \
-  ipython \
-  libblitz=0.10 \
-  libmatio=1.5 \
-  libsvm=3.21 \
-  menpo=0.7.7 \
-  menpofit=0.4.1 \
-  menpowidgets=0.2.1p3 \
-  mne=0.13.1 \
-  openblas=0.2.19 \
-  opencv=3 \
-  pkgtools=0.7.3 \
-  pkg-config \
-  pyedflib=0.1.6 \
-  schema=0.6.5 \
-  sox=14.4.2 \
-  sphinx_rtd_theme \
-  ${TENSORFLOW} \
-  toolchain=2.3.0 \
-  vlfeat=0.9.20
-
+${CONDA} env create -n ${NAME} --file=bob-devel.yml
 echo "[>>] Bye!"
 exit 0
-- 
GitLab