software.cfg 2.45 KB
Newer Older
1 2
[buildout]

Marco Mariani's avatar
Marco Mariani committed
3 4 5
# A proper SR for Dream with no external dependecies (fortran, etc),
# but which uses a virtualenv to ease packaging on the python side.

6 7 8 9 10
extends = 
  ../../stack/slapos.cfg
  ../../component/git/buildout.cfg
  ../../component/gcc/buildout.cfg
  ../../component/libatlas/buildout.cfg
Marco Mariani's avatar
Marco Mariani committed
11
  ../../component/libblas/buildout.cfg
Marco Mariani's avatar
Marco Mariani committed
12
  ../../component/r-language/buildout.cfg
13 14 15 16 17 18

parts =
  python2.7-virtualenv
  eggs
  gcc-fortran
  libatlas
Marco Mariani's avatar
Marco Mariani committed
19
  libblas
Marco Mariani's avatar
Marco Mariani committed
20 21 22
  r-language
  sh-dream-environment
  scikit-env
Marco Mariani's avatar
Marco Mariani committed
23

24 25 26 27 28 29 30 31

[eggs]
recipe = zc.recipe.egg
eggs =
  ${lxml-python:egg}
  slapos.cookbook
  collective.recipe.template

32

Marco Mariani's avatar
Marco Mariani committed
33 34 35 36 37 38 39 40 41 42
[scikit-env]
recipe = cp.recipe.cmd
location = ${buildout:parts-directory}/${:_buildout_section_name_}
install_cmd =
  mkdir -p ${:location}
  cd ${:location}
  unset PYTHONPATH
  ${python2.7-virtualenv:executable} ${:location}
  . ${:location}/bin/activate
  export ATLAS=${libatlas:location}/lib/libsatlas.so
43
  export BLAS=${libblas:location}/lib/libfblas.a
44
  LD_PRELOAD=${gcc-fortran:location}/lib64/libgfortran.so.3
Marco Mariani's avatar
Marco Mariani committed
45 46 47 48 49 50 51 52 53 54 55
  #pip install -U setuptools
  #pip install -U pip
  pip install numpy
  pip install simpy==2.3
  pip install scipy
  pip install scikit-learn
  pip install xlrd
  pip install xlwt
  pip install flask
  pip install pyparsing==1.5.7
  pip install pydot
Marco Mariani's avatar
Marco Mariani committed
56 57 58 59 60 61 62
  # export LDFLAGS="-lncurses"
  export PATH=${r-language:location}/bin:$PATH
  # pip install rpy2
  # clone repo for:
  #   bug fix - https://bitbucket.org/lgautier/rpy2/issue/183
  # (may switch to released egg later)
  pip install mercurial
63
  hg clone -b version_2.4.x_noreadline https://marco.mariani@bitbucket.org/marco.mariani/rpy2
Marco Mariani's avatar
Marco Mariani committed
64 65
  cd rpy2
  python setup.py install
66
  cd ..
67
  ${git:location}/bin/git clone http://git.erp5.org/repos/dream.git -b marco
Marco Mariani's avatar
Marco Mariani committed
68 69
  cd dream
  python setup.py install
Marco Mariani's avatar
Marco Mariani committed
70 71 72 73 74 75 76 77 78
update_cmd = ${:install_cmd}



[sh-dream-environment]
# environment needed for running/debugging the applications, exported to a shell script to be sourced.
recipe = collective.recipe.template
output = ${buildout:directory}/environment.sh
input = inline:
79
  unset PYTHONPATH
80
  export PATH="${r-language:location}/bin:${gcc-fortran:location}/bin:$PATH"
81
  export LD_LIBRARY_PATH="`${r-language:location}/bin/R RHOME`/lib:$LD_LIBRARY_PATH"
82 83 84 85
  export LD_PRELOAD="${gcc-fortran:location}/lib64/libgfortran.so.3 ${libblas:location}/libf77blas.so.3"
  export ATLAS=${libatlas:location}/lib/libsatlas.so
  export BLAS=${libblas:location}/lib/libfblas.a
  export LAPACK=${libatlas:location}/lib/liblapack.a
Marco Mariani's avatar
Marco Mariani committed
86 87


88 89
[versions]
cp.recipe.cmd = 0.5nxd001