-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (31 loc) · 1.28 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
FROM build-base-image
WORKDIR /atompaw-build
ARG ATOMPAW_VERSION
# Compile atompaw
RUN wget -c -O atompaw.tar.gz http://users.wfu.edu/natalie/papers/pwpaw/atompaw-${ATOMPAW_VERSION}.tar.gz && \
mkdir -p atompaw && \
tar xf atompaw.tar.gz -C atompaw --strip-components=1 && \
cd atompaw && \
# Comment out line 4006 of pseudo.F90 and line 79, 80 of pwscfinterface.F90
# to still output pseudo if the negative charge issue appears in generation
sed -i '4006s/^/!/' src/pseudo.F90 && \
sed -i '79s/^/!/' src/pwscfinterface.F90 && \
sed -i '80s/^/!/' src/pwscfinterface.F90 && \
# Compile
mkdir build && \
cd build && \
../configure FC=/usr/bin/gfortran \
LDFLAGS="-static-libgfortran" \
--with-linalg-libs="-L/usr/local/lapack/lib -llapack -lrefblas" \
--enable-libxc \
--with-libxc-incs="-I/usr/local/libxc/include" \
--with-libxc-libs="-L/usr/local/libxc/lib -lxc" && \
make
# Move binaries to a small image to reduce the size
FROM runtime-base-image
RUN apt-get update && apt-get install -y \
libquadmath0 \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean all
COPY --from=0 /atompaw-build/atompaw/build/src/atompaw /usr/local/bin/
COPY --from=0 /atompaw-build/atompaw/build/src/graphatom /usr/local/bin/