-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_container1.def
More file actions
89 lines (75 loc) · 2.34 KB
/
Copy pathsetup_container1.def
File metadata and controls
89 lines (75 loc) · 2.34 KB
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
89
Bootstrap: docker
From: ubuntu:20.04
%files
LHAPDF-6.5.0.tar.gz /opt/
log4cpp-1.1.5rc1.tar.gz /opt/
libxml2-2.14.6.tar.xz /opt/
build_pythia6.sh /opt/
%post
# Set noninteractive frontend for apt
export DEBIAN_FRONTEND=noninteractive
# Install build tools and ROOT dependencies
apt-get update && apt-get install -y \
build-essential cmake gfortran git wget curl \
python3 python3-pip python-is-python3 \
autoconf automake libtool pkg-config \
libgsl-dev libx11-dev libxpm-dev libxft-dev libxext-dev \
libx11-6 libxpm4 libxft2 libxext6 \
libtbb2 libtbb-dev \
libxxhash0 liblz4-1 libssl1.1 \
tzdata \
emacs vim \
&& rm -rf /var/lib/apt/lists/*
# Set timezone to avoid prompts
ln -fs /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
dpkg-reconfigure --frontend noninteractive tzdata
#PYTHIA6
mkdir /opt/pythia && cd /opt/pythia
#wget https://github.com/GENIE-MC/Generator/blob/master/src/scripts/build/ext/build_pythia6.sh
mv /opt/build_pythia6.sh /opt/pythia
chmod +x build_pythia6.sh
./build_pythia6.sh
# LHAPDF
cd /opt
#wget https://lhapdf.hepforge.org/downloads/?f=LHAPDF-6.5.0.tar.gz -O LHAPDF-6.5.0.tar.gz
tar -xzf LHAPDF-6.5.0.tar.gz
cd LHAPDF-6.5.0
./configure --prefix=/opt/lhapdf_install
export PYTHON=python3
make -j$(nproc)
make install
cd ..
# LOG4CPP
cd /opt
tar -xzf log4cpp-1.1.5rc1.tar.gz
cd log4cpp
./configure --prefix=/opt/log4cpp_install
make -j$(nproc)
make install
cd ..
#LIBXML2
cd /opt
tar -xJf libxml2-2.14.6.tar.xz
cd libxml2-2.14.6
./configure --prefix=/opt/libxml2_install
make -j$(nproc)
make install
cd ..
%environment
# PYTHIA6
export PYTHIA6=/opt/pythia/v6_428
export LD_LIBRARY_PATH=$PYTHIA6/lib:$LD_LIBRARY_PATH
# LHAPDF
export LHAPDF=/opt/lhapdf_install
export LHAPDF_INC=$LHAPDF/include
export LHAPDF_LIB=$LHAPDF/lib
export PATH=$LHAPDF/bin:$PATH
export LD_LIBRARY_PATH=$LHAPDF_LIB:$LD_LIBRARY_PATH
# LOG4CPP
export LOG4CPP=/opt/log4cpp_install
export LD_LIBRARY_PATH=$LOG4CPP/lib:$LD_LIBRARY_PATH
export CPATH=$LOG4CPP/include:$CPATH
# LIBXML2
export LIBXML2_INC=/opt/libxml2_install/include/libxml2
export LIBXML2_LIB=/opt/libxml2_install/lib
export LD_LIBRARY_PATH=$LIBXML2_LIB:$LD_LIBRARY_PATH