-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile.build_env
69 lines (55 loc) · 1.78 KB
/
Dockerfile.build_env
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
60
61
62
63
64
65
66
67
68
#########################################################################
# Create a docker base image for building VASP using NVCC / PGI compilers
# For multilayer compilation / debug only. Do not use it for production.
# If you wish to change the hpcsdk version and cuda lib version,
# provide them via docker build commandline options
#
# Additional components
# - compiled BEEF-vdW library at /opt/libbeef for binding
#########################################################################
ARG HPCSDK_VERSION=21.2
ARG CUDA_LIB_VERSION=11.2
ARG UBUNTU_VERSION=20.04
ARG LIBBEEF=/opt/libbeef
# Use many-target cuda to avoid issue with openacc
FROM nvcr.io/nvidia/nvhpc:${HPCSDK_VERSION}-devel-cuda_multi-ubuntu${UBUNTU_VERSION}
ARG LIBBEEF
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Minimal builder requirements
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
make \
intel-mkl-full \
makedepf90 \
libfftw3-3 \
libfftw3-dev \
ca-certificates \
rsync \
unzip \
zip \
wget \
git \
python3 \
python3-pip &&\
rm -rf /var/lib/apt/lists/*
### libbeef only for linking purpose
WORKDIR /opt
RUN echo ${LIBBEEF} &&\
wget https://github.com/vossjo/libbeef/archive/master.zip &&\
unzip master.zip &&\
mkdir libbeef &&\
cd libbeef-master &&\
./configure --prefix=${LIBBEEF} &&\
make -j4 &&\
make install &&\
rm -rf /opt/libbeef-master /opt/master.zip
WORKDIR /opt
RUN mkdir -p ./bin ./vasp-build &&\
git clone https://github.com/MestreLion/git-tools.git &&\
cp git-tools/git* bin/ &&\
rm -rf git-tools
COPY ./compile_vasp.sh /opt/vasp-build/
COPY ./makefile_examples /opt/vasp-build/
RUN ln -s /opt/vasp-build/compile_vasp.sh /opt/bin/ && ls -al /opt/bin && chmod 755 /opt/bin/compile_vasp.sh
ENV PATH=/opt/bin:$PATH