-
Notifications
You must be signed in to change notification settings - Fork 4
/
opensuse
41 lines (36 loc) · 1.86 KB
/
opensuse
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
FROM opensuse/tumbleweed:latest
ARG GMX_BRANCH
ARG GMX_DOUBLE
ARG OPENMPI=openmpi4
RUN zypper dup -y && \
zypper install -y \
make cmake valgrind git gcc-c++ libexpat-devel fftw-devel boost-devel txt2tags ccache procps gnuplot psmisc vim clang llvm python3-pip python3-lxml python3-numpy \
wget hdf5-devel eigen3-devel libxc-devel sudo curl ninja clang-devel llvm-devel libboost_filesystem-devel libboost_program_options-devel libboost_serialization-devel \
libboost_system-devel libboost_regex-devel libboost_test-devel libboost_timer-devel zlib-devel python3-cma python3-espressomd zstd shadow \
libomp-devel libint-devel libecpint-devel doxygen python3-h5py python3-pybind11-devel python3-pytest python3-xmltodict python3-ase && \
zypper clean
# install opensuse's gromacs
RUN if [ -z "${GMX_BRANCH}" ]; then \
zypper install -y gromacs-devel gromacs gromacs-openmpi; \
fi
RUN groupadd -r wheel
RUN useradd -m -G wheel -u 1001 votca
RUN echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER votca
RUN if [[ ! -x /usr/lib64/mpi/gcc/${OPENMPI}/bin/mpirun ]]; then echo "OPENMPI default needs update (is currently ${OPENMPI})"; exit 1; fi
ENV PATH=/usr/lib64/mpi/gcc/${OPENMPI}/bin${PATH:+:}${PATH}
ENV LD_LIBRARY_PATH=/usr/lib64/mpi/gcc/${OPENMPI}/lib64${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}
ENV CCACHE_MAXSIZE=250M
WORKDIR /home/votca
# build certain gromacs version as user
RUN if [ -n "${GMX_BRANCH}" ] && [ "${GMX_BRANCH}" != "none" ]; then \
git clone --depth 1 -b "${GMX_BRANCH}" https://gitlab.com/gromacs/gromacs.git && \
mkdir gromacs/build && cd gromacs/build && \
if [ "${GMX_BRANCH}" != release-2019 ]; then \
gmx_cmake_opts="-DGMX_INSTALL_LEGACY_API=ON"; \
fi && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DGMX_SIMD=SSE2 -DGMX_DOUBLE=${GMX_DOUBLE} ${gmx_cmake_opts} .. && \
make -j3 VERBOSE=1 && \
sudo make install && \
cd ../..; \
fi