-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_mp
58 lines (58 loc) · 2.51 KB
/
Dockerfile_mp
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
######################################################
#
# OpenSees image
# Tag: wangyinz/opensees-container:mp
#
# This is a vanilla installation of OpenSeesMP 3.4.0 on Ubuntu 20.04 compiled with Intel MPI
# You can run the app demo by running the container with no
# arguments.
#
# docker run -it --rm wangyinz/opensees-container:mp
#
# To run your own input, mount your data to the /data volume and
# specify the traditional invocation command
#
# mpirun docker run -it --rm -v `pwd`:/data wangyinz/opensees-container:mp /bin/sh -c 'OpenSeesMP < /data/myinput.tcl'
#
# The data will appear in your current directory at the end of the run.
#
######################################################
FROM ghcr.io/seisscoped/container-base:ubuntu20.04_mpi
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
RUN echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list && \
apt-get -y update && \
apt-get -y install intel-mkl-64bit-2020.1-102 && \
apt-get -y install git vim-tiny make cmake tcl8.6 tcl8.6-dev gcc g++ gfortran python3-dev && \
docker-clean && \
sed -i '3 i . /opt/intel/compilers_and_libraries/linux/mkl/bin/mklvars.sh intel64 mod' /entry.sh && \
useradd --create-home ubuntu
RUN cd /home/ubuntu && \
mkdir bin lib && \
wget http://graal.ens-lyon.fr/MUMPS/MUMPS_5.2.1.tar.gz && \
tar -xf MUMPS_5.2.1.tar.gz && rm MUMPS_5.2.1.tar.gz && \
cd MUMPS_5.2.1 && \
cp Make.inc/Makefile.INTEL.PAR Makefile.inc && \
sed -i 's/mpiicc/mpicc/g' Makefile.inc && \
sed -i 's/mpiifort/mpif90/g' Makefile.inc && \
sed -i 's/OPTF =.*/OPTF = -O3 -fopenmp/g' Makefile.inc && \
sed -i 's/OPTL =.*/OPTL = -O3 -fopenmp/g' Makefile.inc && \
sed -i 's/OPTC =.*/OPTC = -O3 -fopenmp/g' Makefile.inc && \
make -j mumps_lib && mkdir ../mumps && mv lib ../mumps/lib && mv include ../mumps/include && \
cd .. && rm -rf MUMPS_5.2.1
ADD makes/Makefile.def /home/ubuntu/Makefile.def
RUN cd /home/ubuntu && source /entry.sh && git clone https://github.com/OpenSees/OpenSees.git && \
cd OpenSees && \
git checkout v3.4.0 && cp ../Makefile.def ./ && \
PROGRAMMING_MODE=PARALLEL_INTERPRETERS make -j 28 && \
mv EXAMPLES/SmallMP ../SmallMP && cd .. && rm -rf OpenSees Makefile.def
COPY inputs /data
RUN mv /home/ubuntu/SmallMP /data/SmallMP && rmdir /home/scoped
RUN chown -R ubuntu:ubuntu /home/ubuntu /data
ENV HOME=/home/ubuntu \
NB_USER=
USER ubuntu
WORKDIR /data
ENV PATH $PATH:/home/ubuntu/bin
VOLUME ["/data"]
CMD [ "/bin/sh", "-c", "OpenSeesMP" ]