-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrpropa.def
67 lines (49 loc) · 1.71 KB
/
crpropa.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
BootStrap: docker
From: rockylinux:9
%arguments
CRPROPA_VERSION=3.2.1
MUPARSER_VERSION=2.3.4
%labels
Author J. Dvoracek
%post
# install basic devel + system packages:
dnf -y --allowerasing install dnf-plugins-core sudo wget curl
dnf -y group install "Development Tools"
dnf config-manager --set-enabled crb
dnf -y install epel-release
dnf -y install git vim which
# crpropa-specific
dnf -y install python3 python3-devel swig fftw fftw-devel libomp libomp-devel cmake python3-numpy doxygen pkgconf-pkg-config hdf5-devel hdf5 gperftools-devel gperftools zlib-devel
# set python 3.9 as default
update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
#update-alternatives --set python /usr/bin/python3.9
#create builddir:
BUILD_DIR=`mktemp --directory -p /tmp`
echo "BUILD_DIR: ${BUILD_DIR}"
function cleanup {
rm -rf "$BUILD_DIR"
echo "Deleted temp working directory $WORK_DIR"
}
trap cleanup EXIT
# * muparser
cd $BUILD_DIR
wget https://github.com/beltoforion/muparser/archive/refs/tags/v{{ MUPARSER_VERSION }}.tar.gz
tar -xvf ./v{{ MUPARSER_VERSION }}.tar.gz
cd muparser-{{ MUPARSER_VERSION }}
cmake . -DENABLE_SAMPLES=OFF -DENABLE_OPENMP=ON -DBUILD_SHARED_LIBS=ON
make install
# * crpropa
cd $BUILD_DIR
wget https://github.com/CRPropa/CRPropa3/archive/refs/tags/{{ CRPROPA_VERSION }}.tar.gz
tar -xvf ./{{ CRPROPA_VERSION }}.tar.gz
cd CRPropa3-{{ CRPROPA_VERSION }}
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local
make
make install
# * healpy
pip install healpy
%environment
export LC_ALL=C
export SHELL=/bin/bash