-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSingularity.def
executable file
·54 lines (40 loc) · 1.47 KB
/
Singularity.def
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
BootStrap: debootstrap
OSVersion: jammy
MirrorURL: http://us.archive.ubuntu.com/ubuntu/
%setup
mkdir -p ${SINGULARITY_ROOTFS}/runcode
cp -R BIOMEC/Analysiscode/. ${SINGULARITY_ROOTFS}/runcode/
cp BIOMEC/mecsim.cpython-310-x86_64-linux-gnu.so ${SINGULARITY_ROOTFS}/runcode/mecsim.cpython-310-x86_64-linux-gnu.so
%files
%runscript
# var 1 = Input file
if [ $# -ne 1 ];
then
echo "Please provide an Input file."
exit 1
fi
echo "running"
python3.10 ${SINGULARITY_ROOTFS}/runcode/PINTS_MECsim.py $1
echo "finished"
%labels
AUTHOR Luke Gundry
MECSim Aurthor: Gareth Kennedy
Licenses as per documentation
Currenly set up to run on python 3.10 in unbuntu bionic working in a singulrity Version 3.1 container though higher should work
%post
# install packages and python modules
apt-get -y --force-yes install vim
apt-get -y --force-yes update
apt-get -y --force-yes install build-essential git
apt-get -y --force-yes install gfortran
apt-get -y --force-yes install python3.10
apt-get -y --force-yes install software-properties-common
apt-get -y --force-yes install bc
apt-add-repository universe
apt-get update
apt-get -y --force-yes install python3-pip python3.10-dev
python3.10 -m pip install --upgrade pip
python3.10 -m pip install pandas numpy scipy cma seaborn matplotlib
python3.10 -m pip install pints
# change permissions of files
chmod -R 777 ${SINGULARITY_ROOTFS}/runcode