-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrmextract.def
61 lines (45 loc) · 1.8 KB
/
rmextract.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
Bootstrap: debootstrap
MirrorURL: http://archive.ubuntu.com/ubuntu/
OSVersion: jammy
%labels
APPLICATION_NAME Ubuntu LTS + RMextract
OS_VERSION 22.04
APPLICATION_URL https://pypi.org/project/RMextract/
SYSTEM_NAME ilifu
SYSTEM_SINGULARITY_VERSION 3.9
SYSTEM_URL http://www.ilifu.ac.za
AUTHOR_NAME IDIA
AUTHOR_EMAIL [email protected]
%help
RMextract is Python software to extract TEC, vTEC, Earthmagnetic field and Rotation Measures (RM)
from GPS and WMM data for radio interferometry observations.
%environment
export LC_ALL=C
%post
# Create Installation Directories and export paths. This is needed as part of post.
# %environment scriptlet does not define these paths during %post, only after.
mkdir -p /opt
export DEBIAN_FRONTEND=noninteractive
# Installation of initial packages
apt-get update -y && apt-get dist-upgrade -y
apt-get install -y software-properties-common
add-apt-repository -y universe
apt-get update -y
apt-get install -y wget vim apt-utils git build-essential bzip2 curl pkg-config python-is-python3 python3-pip gfortran
# Install python packages
python -m pip install numpy scipy astropy
# Install RMextract
cd /opt
git clone https://github.com/lofar-astron/RMextract.git
cd RMextract
python setup.py build
python setup.py install
# Install IPykernel for Jupyter
python -m pip install ipykernel
# Fix command prompt in Singularity 3.5.2
printf 'export PS1="\u@$SINGULARITY_NAME:\w$ "' > /.singularity.d/env/999-psvars.sh
# Cleanup the container
apt-get clean
apt-get autoclean
%runscript
python "$@"