forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.gnu
58 lines (49 loc) · 2.34 KB
/
Dockerfile.gnu
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
FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y --no-install-recommends git gfortran libssl-dev make cmake vim wget bc unzip \
&& apt-get install -y --no-install-recommends mpich libmpich-dev
ENV GIT_SSL_NO_VERIFY 1
RUN cd /tmp \
&& git clone https://github.com/USCiLab/cereal.git \
&& cp -r cereal/include /usr/local \
&& rm -rf cereal
RUN cd /tmp \
&& git clone https://github.com/xianyi/OpenBLAS.git --single-branch --depth=1 \
&& cd OpenBLAS && make NO_AVX512=1 FC=gfortran -j8 && make PREFIX=/usr/local install \
&& cd /tmp && rm -rf OpenBLAS
RUN cd /tmp \
&& git clone https://github.com/darelbeida/scalapack.git -b v2.0.2-openblas --single-branch --depth=1 \
&& cd scalapack && make lib && cp libscalapack.a /usr/local/lib/ \
&& cd /tmp && rm -rf scalapack
RUN cd /tmp \
&& git clone https://github.com/darelbeida/elpa.git -b ELPA_2016.05.004-openblas --single-branch --depth=1 \
&& cd elpa && mkdir build && cd build \
&& ../configure CFLAGS="-O3 -march=native -mavx2 -mfma -funsafe-loop-optimizations -funsafe-math-optimizations -ftree-vect-loop-version -ftree-vectorize" \
FCFLAGS="-O2 -mavx" \
&& make -j8 && make PREFIX=/usr/local install \
&& ln -s /usr/local/include/elpa-2016.05.004/elpa /usr/local/include/ \
&& cd /tmp && rm -rf elpa
RUN cd /tmp \
&& wget http:https://www.fftw.org/fftw-3.3.9.tar.gz \
&& tar zxvf fftw-3.3.9.tar.gz \
&& cd fftw-3.3.9 \
&& ./configure --enable-mpi-fortran --enable-orterun-prefix-by-default FC=gfortran \
&& make -j8 && make PREFIX=/usr/local install \
&& cd /tmp && rm -rf fftw-3.3.9 && rm fftw-3.3.9.tar.gz
RUN cd /tmp \
&& wget https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-1.9.0%2Bcpu.zip --no-check-certificate --quiet \
&& unzip libtorch-shared-with-deps-1.9.0+cpu.zip \
&& cp -r libtorch/include /usr/local \
&& cp -r libtorch/lib /usr/local \
&& cp -r libtorch/share /usr/local \
&& rm -rf libtorch
RUN cd /tmp \
&& wget https://gitlab.com/libxc/libxc/-/archive/5.1.5/libxc-5.1.5.tar.gz --no-check-certificate --quiet \
&& tar xzf libxc-5.1.5.tar.gz \
&& cd libxc-5.1.5 \
&& mkdir build \
&& cmake -B build -DBUILD_TESTING=OFF \
&& cmake --build build \
&& cmake --install build \
&& cd /tmp \
&& rm -rf libxc-5.1.5 \
&& rm libxc-5.1.5.tar.gz