-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (34 loc) · 1.24 KB
/
Dockerfile
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
# syntax=docker/dockerfile:1
FROM base-image
# Tool chain for building
RUN apt-get update && apt-get install -y \
build-essential \
automake \
autoconf \
libtool \
wget \
gfortran-7 && \
apt-get clean && rm -rf /var/lib/apt/lists/*
ARG GNU_COMPILER_VERSION
RUN update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${GNU_COMPILER_VERSION} 2 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GNU_COMPILER_VERSION} 2
WORKDIR /build
ARG LAPACK_VERSION
RUN wget -c -O lapack.tar.gz https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v${LAPACK_VERSION}.tar.gz && \
mkdir -p lapack && \
tar xf lapack.tar.gz -C lapack --strip-components=1 && \
cd lapack && \
cp INSTALL/make.inc.gfortran make.inc && \
make lapacklib blaslib && \
mkdir -p /usr/local/lapack/lib && \
cp *.a /usr/local/lapack/lib
ARG LIBXC_VERSION
RUN wget -c -O libxc.tar.gz https://gitlab.com/libxc/libxc/-/archive/${LIBXC_VERSION}/libxc-${LIBXC_VERSION}.tar.gz && \
mkdir -p libxc && \
tar xf libxc.tar.gz -C libxc --strip-components=1 && \
cd libxc && \
autoreconf -i && \
./configure --prefix=/usr/local/libxc && \
make && make install
RUN rm -rf /build
WORKDIR /