-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.def
55 lines (46 loc) · 1.98 KB
/
main.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
BootStrap: docker
From: holbertonschool/ubuntu-1404-gcc5
%post
export PARALLEL_BUILD=36
# Using Chinese Source, You may need to delete these line
sudo sed -i "s@http://.*archive.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list
sudo sed -i "s@http://.*security.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list
# Install tools
apt-get update -y && apt-get install -y zip cmake wget libboost-dev build-essential gfortran cmake \
libhdf5-serial-dev libfftw3-dev gfortran python-matplotlib \
python-scipy liblapack-dev xsltproc python-dev libboost-all-dev
# Download Source Repo:
export PROJECT_DIR=/project && mkdir -p $PROJECT_DIR && cd $PROJECT_DIR
wget https://github.com/qiyang-ustc/ALPS_SIF/archive/refs/heads/master.zip && \
unzip master.zip && rm master.zip && mv ./ALPS_SIF-master/* ./ && rmdir ALPS_SIF-master
# Download Boost
wget https://boostorg.jfrog.io/artifactory/main/release/1.63.0/source/boost_1_63_0.zip && \
unzip boost_1_63_0.zip && \
rm boost_1_63_0.zip && \
echo "Install Boost finished"
# Build ALPS
mkdir -p /project/alps-2.3.0-src/alps/build && \
cd /project/alps-2.3.0-src/alps/build && \
cmake -DALPS_BUILD_FORTRAN=ON \
-DALPS_ENABLE_OPENMP=ON \
-DCMAKE_CXX_COMPILER=/usr/bin/g++\
-DCMAKE_C_COMPILER=/usr/bin/gcc\
-DCMAKE_INSTALL_PREFIX=/project/alps\
-DBoost_ROOT_DIR:PATH=/project/boost_1_63_0\
-DHDF5_LIBRARIES=/usr/lib/x86_64-linux-gnu/libhdf5.so\
/project/alps-2.3.0-src/alps && \
make -j$PARALLEL_BUILD && make install -j$PARALLEL_BUILD
%environment
export LC_ALL=C
export CXX=/usr/bin/g++
export ALPS_DIR=/project/alps/share/alps/
export BOOST_PATH=/project/boost_1_63_0
export PROJECT_DIR=/project
%labels
MAINTAINER QiYang
OS_VERSION ubuntu-14
GCC_VERSIOn 4.x
EIGEN_VERSION 3.4.0
ALPS_VERSION 2.3.0
BOOST_VERSION 1.63.0
%runscript