-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
70 lines (54 loc) · 2.97 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
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
69
70
FROM fedora:32
MAINTAINER Krishna Kumar <[email protected]>
# Update to latest packages, remove vim-minimal & Install Git, GCC, Clang, Autotools and VIM
RUN dnf update -y && \
dnf remove -y vim-minimal sqlite && \
dnf install -y boost boost-devel clang clang-analyzer clang-tools-extra cmake cppcheck dnf-plugins-core \
diffutils eigen3-devel findutils freeglut freeglut-devel gcc gcc-c++ git hdf5 hdf5-devel \
kernel-devel lcov libnsl libXext libXext-devel make ninja-build openblas openblas-devel \
openblas-openmp python pip tar tbb tbb-devel \
valgrind vim vtk vtk-devel wget && \
dnf clean all
# Install GMSH
# RUN git clone https://gitlab.onelab.info/gmsh/gmsh.git --depth 1
# RUN cd gmsh && mkdir build && cd build && cmake -DENABLE_BUILD_DYNAMIC=1 .. && make && make install && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64/
# Install MKL
RUN dnf config-manager --add-repo https://yum.repos.intel.com/mkl/setup/intel-mkl.repo && \
rpm --import https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
dnf install -y intel-mkl
# Install Intel MPI
RUN dnf config-manager --add-repo https://yum.repos.intel.com/mpi/setup/intel-mpi.repo && \
rpm --import https://yum.repos.intel.com/mpi/setup/PUBLIC_KEY.PUB && \
dnf install -y intel-mpi-2019.8-108.x86_64
# Create a user cbgeo
RUN useradd cbgeo
USER cbgeo
# Install pandas and tables
RUN pip3 install pandas tables --user
# Configure MKL
RUN echo "source /opt/intel/bin/compilervars.sh -arch intel64 -platform linux" >> ~/.bashrc
RUN echo "source /opt/intel/mkl/bin/mklvars.sh intel64" >> ~/.bashrc
# Configure MPI
RUN echo "source /opt/intel/compilers_and_libraries_2020.2.254/linux/mpi/intel64/bin/mpivars.sh" >> ~/.bashrc
# Load OpenMPI module
#RUN source /etc/profile.d/modules.sh && export MODULEPATH=$MODULEPATH:/usr/share/modulefiles && module load mpi/openmpi-x86_64
#ENV PATH="/usr/lib64/openmpi/bin/:${PATH}"
# PETSc
# RUN cd /home/cbgeo/ && git clone --depth 1 -b main https://gitlab.com/petsc/petsc.git petsc && \
# cd petsc && ./configure PETSC_DIR=/home/cbgeo/petsc/ --with-debugging=0 COPTFLAGS='-O3 -march=arch-linux2-c-opt -mtune=native' CXXOPTFLAGS='-O3 -march=arch-linux2-c-opt -mtune=native' && make PETSC_DIR=/home/cbgeo/petsc PETSC_ARCH=arch-linux-c-opt all -j2 && \
# make PETSC_DIR=/home/cbgeo/petsc PETSC_ARCH=arch-linux-c-opt check
#ENV PETSC_ARCH=arch-linux-c-opt
#ENV PETSC_DIR=/home/cbgeo/petsc/
# KaHIP
RUN cd /home/cbgeo/ && git clone https://github.com/schulzchristian/KaHIP.git && \
cd KaHIP && sh ./compile_withcmake.sh
# Partio
RUN cd /home/cbgeo/ && git clone https://github.com/wdas/partio.git && \
cd partio && cmake . && make
# Create a research directory and clone git repo of mpm code
#RUN mkdir -p /home/cbgeo/research && \
# cd /home/cbgeo/research && \
# git clone https://github.com/cb-geo/mpm.git
# Done
WORKDIR /home/cbgeo/research/mpm
RUN /bin/bash "$@"