/
Singularity.1.0.0
73 lines (44 loc) · 1.69 KB
/
Singularity.1.0.0
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
66
67
68
69
70
71
72
73
Bootstrap:shub
From:ResearchIT/spack-singularity:openmpi
%labels
MAINTAINER severin@iastate.edu
APPLICATION MaSurCArunScripts
%help
This container contains all the necessary programs to run MaSuRCA
See https://github.com/ISUGIFsingularity/masurca.git for more inforation
%environment
source /etc/profile.d/modules.sh
SPACK_ROOT=/opt/spack
export SPACK_ROOT
export PATH=$SPACK_ROOT/bin:$PATH
source /etc/profile.d/modules.sh
source $SPACK_ROOT/share/spack/setup-env.sh
#for d in /opt/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/*/bin; do export PATH="$PATH:$d"; done
# make sure spack is up2date
module load perl
module load masurca
%post
export SPACK_ROOT=/opt/spack
export SPACK_ROOT
export PATH=$SPACK_ROOT/bin:$PATH
# make sure spack is up2date
cd $SPACK_ROOT
git pull
# modify package to include latest verson
awk '/ftp.genome.umd.edu/ { print; print "\n";printf " version('\''3.2.8'\'', '\''7e01fd95f7aefa270b67373ef8f1f8ce'\'', url='\''https://github.com/alekseyzimin/masurca/releases/download/3.2.8/MaSuRCA-3.2.8.tar.gz'\'')"; next }1' $SPACK_ROOT/var/spack/repos/builtin/packages/masurca/package.py > package.py
mv package.py $SPACK_ROOT/var/spack/repos/builtin/packages/masurca/
cd -
yum -y install bc paste wget
yum clean all
export FORCE_UNSAFE_CONFIGURE=1
source $SPACK_ROOT/share/spack/setup-env.sh
#bzip.org is down, dfetching repo from fossies.org into mirror
mkdir -p $SPACK_ROOT/mirror/bzip2
spack mirror add local $SPACK_ROOT/mirror
pushd $SPACK_ROOT/mirror/bzip2
wget https://fossies.org/linux/misc/bzip2-1.0.6.tar.gz
popd
spack install masurca@3.2.8
#for d in /opt/spack/opt/spack/linux-centos7-x86_64/gcc-4.8.5/*/bin; do export PATH="$PATH:$d"; done
cd $SPACK_ROOT
%runscript