-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsingularity.def
87 lines (68 loc) · 2.43 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
BootStrap: docker
From: ubuntu:20.04
%labels
APPLICATION_NAME_BASE Ubuntu LTS + MeqSilhouette + dependencies
OS_VERSION 20.04
SYSTEM_NAME MeqSv2
SYSTEM_SINGULARITY_VERSION 3.10.2
SYSTEM_URL https://github.com/rdeane/MeqSilhouette
AUTHOR_NAME Iniyan Natarajan, Robin Hall
AUTHOR_EMAIL iniyan.natarajan@wits.ac.za, robin@idia.ac.za
%help
A base Ubuntu 20 Singularity container with MeqSilhoutte software as per documentation specified at
https://meqsilhouette.readthedocs.io/en/master/requirements.html§
%post
# make opt directory for installs
mkdir -p /opt
# ensures no interaction for tzdata in casa install
export DEBIAN_FRONTEND=noninteractive
# install utility packages and repositories
apt-get update -y
apt-get install -y wget vim python3-pip gcc python3 unzip git time
apt-get install -y build-essential cmake g++ rsync libboost-python-dev \
libboost-program-options-dev texlive-latex-extra texlive-fonts-recommended dvipng cm-super
# build aatm manually
cd
cd /opt
wget -c https://launchpad.net/aatm/trunk/0.5/+download/aatm-0.5.tar.gz
tar -xzf aatm-0.5.tar.gz
cd aatm-0.5 && ./configure && make && make install
# install kern 7
apt-get install -y software-properties-common
add-apt-repository -s ppa:kernsuite/kern-7
apt-add-repository multiverse
apt-add-repository restricted
# install required packages
apt-get install -y \
meqtrees \
meqtrees-timba \
tigger-lsm \
python3-astro-tigger \
python3-astro-tigger-lsm \
casalite \
wsclean \
pyxis \
python3-casacore
pip install numpy==1.21
apt-get clean
# update casa data
casa-config --exec update-data
# download and install MeqSilhouette from master
cd
cd /opt
git clone --depth 1 https://github.com/rdeane/MeqSilhouette.git
cd MeqSilhouette && pip install .
cd
%environment
export MEQTREES_CATTERY_PATH=/usr/lib/python3/dist-packages/Cattery
export PATH=/usr/local/bin:$PATH
export PYTHONPATH=/usr/local/lib/python3.8/dist-packages:/usr/lib/python3/dist-packages # for Tigger
export LC_ALL=C
%runscript
echo "Arguments received: $*"
meqsilhouette "$@"
%test
# Sanity check that the container is operating
# make sure that a python import is working
echo $(which python)
/usr/bin/python -c "import numpy as np;np.__config__.show()"