-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSingularity_no_IFS
executable file
·68 lines (51 loc) · 1.82 KB
/
Singularity_no_IFS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Bootstrap: docker
From: centos:7
%setup
mkdir ${SINGULARITY_ROOTFS}/opt/splib
%files
#splib/*.py /opt/splib/
#spmaster.py /opt/
# oifs-input/ /opt/
#dales-input/ /opt/
%post
yum -y update
yum install -y epel-release
yum groupinstall -y "Development Tools"
yum install -y git mercurial gcc-gfortran cmake python-devel python-pip python-wheel wget openmpi-devel mpi4py-openmpi netcdf-devel netcdf-fortran-devel fftw-devel gmp-devel mpfr-devel gsl-devel atls atlas-devel blas-devel lapack-devel perl-Digest-MD5 perl-Time-Piece perl-IO-Compress
pip install --upgrade --ignore-installed pip setuptools
pip install moviepy f90nml numpy scipy matplotlib nose h5py docutils netCDF4 shapely psutil cython
cd /opt
# wget https://software.ecmwf.int/wiki/download/attachments/3473437/grib_api-1.21.0-Source.tar.gz?api=v2 -O grib_api-1.21.0-Source.tar.gz
# tar -xzf grib_api-1.21.0-Source.tar.gz
# cd grib_api-1.21.0-Source
# mkdir build
# cd build
# cmake ..
# make
# make install
# export GRIB_API_DIR=$PWD
cd /opt
git clone --single-branch --depth=1 https://github.com/amusecode/amuse.git
cd amuse
export PYTHON=python
export MODULEPATH=/etc/modulefiles
eval `/usr/bin/modulecmd sh load mpi/openmpi-x86_64`
./configure FC=gfortran FCFLAGS="-I/usr/include -I/usr/lib64/gfortran/modules"
make framework
cd src
hg clone -r new_parameterapproach_dales https://bitbucket.org/omuse/omuse
cd omuse
export DOWNLOAD_CODES=1
#cd community/oifs
#export OIFS_GRIB_API_DIR=$GRIB_API_DIR
#make
#cd ../dales
cd community/dales
make
%environment
PYTHONPATH=/opt/amuse/src/:/opt/splib/
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
# LD_LIBRARY_PATH=/.singularity.d/libs:/usr/local/lib/
# GRIB_SAMPLES_PATH=/usr/local/share/grib_api/ifs_samples/grib1_mlgrib2
MODULEPATH=/etc/modulefiles
export PYTHONPATH GRIB_SAMPLES_PATH LD_LIBRARY_PATH MODULEPATH