-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.fenics-adapter
56 lines (42 loc) · 1.76 KB
/
Dockerfile.fenics-adapter
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
# System testing preCICE with fenics-adapter
# Building on top of the latest preCICE-build
ARG branch=develop
ARG from=precice/precice-ubuntu1804.home-${branch}
FROM $from
USER root
ENV USER=root
ENV DEBIAN_FRONTEND=noninteractive
# Installing necessary dependencies
RUN apt-get -qq update && apt-get -qq install \
apt-utils && \
apt-get -qq install \
software-properties-common \
python3-dev \
python3-pip && \
rm -rf /var/lib/apt/lists/*
# Install FEniCS
RUN add-apt-repository -y ppa:fenics-packages/fenics && \
apt-get -qq update && \
apt-get -qq install --no-install-recommends fenics && \
rm -rf /var/lib/apt/lists/*
USER precice
# Upgrade pip to newest version (pip version from 18.04 apt-get is outdated)
RUN python3 -m pip install --user --upgrade pip
# Use pip to install cython (apt-get version of cython is too old)
RUN python3 -m pip install --user cython # TODO: can we put this dependency into requirements.txt of python?
# Rebuild image if force_rebuild after that command
ARG CACHEBUST
ARG bindings_branch=develop
ARG adapter_branch=develop
# Builds the precice python bindings for python3
RUN python3 -m pip install --user https://github.com/precice/python-bindings/archive/$bindings_branch.zip
# Building fenics-adapter
RUN python3 -m pip install --user numpy==1.14.5 https://github.com/precice/fenics-adapter/archive/$adapter_branch.zip
# ----- TODO: Remove this block after fenics issue is fixed -----
# At the moment, attempting to use fenics causes an ImportError
# Uninstalling fenics-ufl will resolve this problem.
RUN pip3 uninstall -y fenics-ufl
# ---------------------------------------------------------------
WORKDIR /home/precice
RUN mkdir -p Logs Data/Input Data/Output Data/Exchange
WORKDIR /home/precice/fenics-adapter