-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
79 lines (73 loc) · 1.89 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
# Builds a Docker image with the necessary libraries for compiling
# FEniCS. The image is at
# https://hub.docker.com/r/fenicsproject/performance-tests
#
# Authors: Garth N. Wells <gnw20@cam.ac.uk>
ARG PETSC_VERSION=3.12.4
FROM ubuntu:20.04
WORKDIR /tmp
# Environment variables
ENV OPENBLAS_NUM_THREADS=1
# Non-Python utilities and libraries
RUN apt-get -qq update && \
apt-get -y --with-new-pkgs \
-o Dpkg::Options::="--force-confold" upgrade && \
apt-get -y install \
bison \
clang \
cmake \
flex \
g++ \
gfortran \
git \
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-math-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-thread-dev \
libboost-timer-dev \
liblapack-dev \
libmpich-dev \
libopenblas-dev \
libhdf5-mpich-dev \
mpich \
ninja-build \
python3 \
python3-dev \
pkg-config \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install PETSc from source
ARG PETSC_VERSION
RUN git clone --branch v${PETSC_VERSION} --depth 1 https://gitlab.com/petsc/petsc.git && \
cd petsc && \
python3 ./configure --with-64-bit-indices=0 \
--COPTFLAGS="-O3" \
--CXXOPTFLAGS="-O3" \
--FOPTFLAGS="-O3" \
--with-c-support \
--with-fortran-bindings=no \
--with-debugging=0 \
--with-shared-libraries \
--download-hypre \
--download-ptscotch \
--prefix=/usr/local/petsc-32 && \
make && \
make install && \
git clean -fdx . && \
python3 ./configure --with-64-bit-indices=1 \
--COPTFLAGS="-O3" \
--CXXOPTFLAGS="-O3" \
--FOPTFLAGS="-O3" \
--with-c-support \
--with-fortran-bindings=no \
--with-debugging=0 \
--with-shared-libraries \
--download-hypre \
--download-ptscotch \
--prefix=/usr/local/petsc-64 && \
make && \
make install && \
rm -rf /tmp/*