-
Notifications
You must be signed in to change notification settings - Fork 92
/
Dockerfile
executable file
·91 lines (79 loc) · 2.31 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Start from the official Focal Fossa (20.04 LTS) image
ARG BASE_IMAGE=ubuntu:20.04
FROM ${BASE_IMAGE}
RUN apt-get update && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y \
ssh \
# wget \
rpm \
build-essential\
zlib1g-dev \
binutils-dev \
gcc\
g++\
gfortran mpich \
libblas-dev \
liblapack-dev \
autoconf \
autotools-dev \
# gnuplot \
libfl-dev \
libreadline-dev \
libgmp-dev \
libmpfr-dev \
libfftw3-dev \
libboost-system-dev \
libboost-thread-dev \
libcgal-dev \
libmpc-dev \
# ping \
nano \
libstdc++5 \
libiberty-dev \
software-properties-common ;\
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y \
git \
cmake \
mpich \
libopenblas-dev ;\
rm -rf /var/lib/apt/lists/*
WORKDIR /root/
# Download and install GKlib, metis and parmetis dependencies
RUN mkdir -p /root/local ;\
cd /root/ ;\
git clone https://github.com/KarypisLab/GKlib.git
RUN make -C /root/GKlib config cc=gcc prefix=/root/local
RUN cd /root/GKlib && make install
RUN cd /root/ ;\
git clone https://github.com/KarypisLab/METIS.git
RUN make -C /root/METIS config cc=gcc prefix=/root/local
RUN cd /root/METIS && make install
RUN cd /root/ ;\
git clone https://github.com/KarypisLab/ParMETIS.git
RUN make -C /root/ParMETIS config cc=mpicc prefix=/root/local
RUN cd /root/ParMETIS && make install
# Add src and compile
ADD src /root/CODE
# Add tecplot dependency
# TODO build the download and compilation of libtecio.a
ADD bin/lib/tecplot/libtecio.a /root/CODE
RUN cd /root/CODE && make -f Makefile_docker all
ENV OMPI_MCA_btl_vader_single_copy_mechanism=none
# Make & set a rundir & copy executable
RUN mkdir -p /ucns3d_run
RUN cp /root/CODE/ucns3d_p /ucns3d_run
# Clean ubuntu dependencies
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Remove src and metis dependencies
RUN rm -rf /root/CODE && rm -rf /root/GKlib && rm -rf /root/METIS && rm -rf /ParMETIS
WORKDIR /ucns3d_run
# Copy taylor green problem and run script
# TODO abstract testing out from dockerfile.
COPY tests/taylor_green_vortex/* /ucns3d_run/
COPY tests/execute-tests.sh /ucns3d_run/
RUN chmod +x execute-tests.sh
RUN sed -i -e 's/\r$//' /ucns3d_run/execute-tests.sh