-
Notifications
You must be signed in to change notification settings - Fork 0
/
inj_orca.def
59 lines (46 loc) · 1.57 KB
/
inj_orca.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
Bootstrap: docker
From: ubuntu:22.04
Stage: devel
%arguments
NPJ=4
%files
orca_5_0_4_linux_x86-64_shared_openmpi411.tar.xz /opt
libxc.patch /opt
%post
# update packages
cd /opt
apt update && apt install -y git build-essential cmake xz-utils wget python3
# download openmpi and libxc
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.1.tar.gz
git clone https://gitlab.com/libxc/libxc.git -b 5.1.1
# install orca
mkdir orca && mkdir orcabin && tar xf orca_5_0_4_linux_x86-64_shared_openmpi411.tar.xz -C orca --strip-components 1
# install openmpi
tar xf openmpi-4.1.1.tar.gz
cd openmpi-4.1.1
./configure --prefix /opt/openmpi && make -j {{ NPJ }} && make install
echo "plm_rsh_agent = " >> /opt/openmpi/etc/openmpi-mca-params.conf
# install libxc
cd /opt/libxc
patch src/functionals.c ../libxc.patch
cmake . -Bbuild -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/opt
cmake --build build --parallel {{ NPJ }}
cmake --install build
Bootstrap: docker
From: ubuntu:22.04
Stage: final
%files from devel
/opt/orca /opt
/opt/orcabin /opt
/opt/lib /opt
/opt/openmpi /opt
%environment
export PATH=/opt/orca:/opt/openmpi/bin:$PATH
export LD_LIBRARY_PATH=/opt/orca:/opt/openmpi/lib:$LD_LIBRARY_PATH
export LD_PRELOAD=/opt/lib/libxc.so
%labels
Author losev.tim.v@gmail.com
Version v1.0.0
%help
This is a container used to run ORCA with injection custom Libxc that uses M06-2X
parameters from external files XC_HYB_MGGA_X_M06_2X.params and XC_MGGA_C_M06_2X.params.