-
Notifications
You must be signed in to change notification settings - Fork 3
/
singularity.recipe
88 lines (82 loc) · 2.68 KB
/
singularity.recipe
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
88
Bootstrap: docker
From: ubuntu:18.04
%post
export DEBIAN_FRONTEND=noninteractive
# Install common dependencies
apt-get update
apt-get --yes install --no-install-recommends \
bison \
build-essential\
cmake \
flex \
git \
gfortran \
g++ \
libblas-dev \
libboost-date-time-dev \
libboost-dev \
libboost-filesystem-dev \
libboost-numpy-dev \
libboost-program-options-dev \
libboost-python-dev \
libboost-regex-dev \
libboost-signals-dev \
libboost-system-dev \
libboost-test-dev \
libboost-thread-dev \
libcfitsio-dev \
libfftw3-dev \
libhdf5-serial-dev \
liblapacke-dev \
libncurses5-dev \
libpython2.7-dev \
libreadline-dev \
python \
python-numpy \
python3-dev \
python3-pip \
python3-setuptools \
wcslib-dev \
wget
pip3 install \
dash \
dash-bootstrap-components \
numpy \
astroquery \
astropy \
ipython \
fpdf \
ephem \
matplotlib
# Install casacore-data
mkdir -p /opt/lofarsoft/data \
&& cd /opt/lofarsoft/data \
&& wget ftp://[email protected]/outgoing/Measures/WSRT_Measures.ztar \
&& tar xvf WSRT_Measures.ztar \
&& rm WSRT_Measures.ztar
# Install casacore
wget https://github.com/casacore/casacore/archive/v3.1.2.tar.gz \
&& tar xvf v3.1.2.tar.gz && cd casacore-3.1.2 && mkdir build \
&& cd build \
&& cmake -DBUILD_PYTHON=True \
-DDATA_DIR=/opt/lofarsoft/data \
-DUSE_OPENMP=ON -DUSE_THREADS=OFF -DUSE_FFTW3=TRUE \
-DUSE_HDF5=ON -DBUILD_PYTHON3=ON -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/lofarsoft/ \
-DCMAKE_CXX_FLAGS="-fsigned-char -O2 -DNDEBUG -march=native" ../ \
&& make -j4 && make install \
&& cd ../../ && rm -rf casacore-3.1.2 v3.1.2.tar.gz
# Install python casacore
wget https://github.com/casacore/python-casacore/archive/v3.1.1.tar.gz \
&& tar xvf v3.1.1.tar.gz && cd python-casacore-3.1.1 \
&& python3 setup.py build_ext -I/opt/lofarsoft/include -L/opt/lofarsoft/lib/ \
&& mkdir -p /opt/lofarsoft/lib/python3.6/site-packages/ \
&& export PYTHONPATH=/opt/lofarsoft/lib/python3.6/site-packages/ \
&& python3 setup.py install --prefix=/opt/lofarsoft \
&& cd ../ && rm -r python-casacore-3.1.1 v3.1.1.tar.gz
%environment
export PATH=${PATH}:/opt/lofarsoft/bin/
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/lofarsoft/lib/
export PYTHONPATH=/opt/lofarsoft/lib/python3.6/site-packages/
%help
Singularity image containing all the dependencies needed to host LOFAR calculator.