-
Notifications
You must be signed in to change notification settings - Fork 0
/
first_try
57 lines (46 loc) · 1.77 KB
/
first_try
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
Bootstrap: docker
From: ubuntu:18.04
%setup
# mkdir ${SINGULARITY_ROOTFS}/repos
# mkdir ${SINGULARITY_ROOTFS}/repos/StatisticalDistributionsLib
# mkdir ${SINGULARITY_ROOTFS}/repos/SimulationLib
# mkdir ${SINGULARITY_ROOTFS}/repos/TBABM
mkdir ${SINGULARITY_ROOTFS}/params_bucket
%files
%environment
%post
apt-get update
apt-get -y install cmake make git libeigen3-dev libboost-all-dev clang python-pip
pip install csvkit
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
git clone https://github.com/yaesoubilab/StatisticalDistributionsLib repos/StatisticalDistributionsLib/
git clone https://github.com/yaesoubilab/SimulationLib repos/SimulationLib/
git clone https://github.com/yaesoubilab/TBABM repos/TBABM/
cd repos/StatisticalDistributionsLib && cmake . && make install && cd ..
cd SimulationLib/SimulationLib && cmake . && make install && cd ../..
cd TBABM && git checkout new-tb-initialization && cmake . && make && cd ../..
NOW=`date`
echo "export NOW=\"${NOW}\"" >> $SINGULARITY_ENVIRONMENT
# With this post section, it should be possible to simply cp the TBABM
# directory over, go to params/ and run ./updateJSONs.sh, and then run
# the simulation as normal
%runscript
echo "Container was created $NOW"
echo "Arguments received: $*"
# exec cd ${SINGULARITY_ROOTFS}/repos/TBABM/src && ./TBABM "$@"
%startscript
nc -lp $LISTEN_PORT
%test
grep -q NAME=\"Ubuntu\" /etc/os-release
if [ $? -eq 0 ]; then
echo "Container base is Ubuntu as expected."
else
echo "Container base is not Ubuntu."
fi
%labels
Author marcus.russi@yale.edu
Version v0.0.1
URL https://github.com/yaesoubilab
%help
This is a production container used for cluster-based runs of TBABM