diff --git a/Dockerfile b/Dockerfile index 325b6e4..824492a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM docker.io/python:3.9.7-bullseye +ARG PYTHON_TAG=3.9.7-bullseye +FROM docker.io/python:$PYTHON_TAG ARG DEBIAN_FRONTEND=noninteractive # dolfin @@ -19,27 +20,36 @@ RUN apt-get update -yqq && \ rm -rf /var/lib/apt/lists/* # fenics -RUN pip install -U fenics-ffc -ENV FENICS_VERSION=2019.1.0.post0 -RUN mkdir -p /tmp/src/ - RUN git config --global user.email mm@clfx.cc RUN git config --global user.name mm +RUN mkdir -p /tmp/src/ && cd /tmp/src/ && \ + git clone https://bitbucket.org/fenics-project/ufl && \ + cd ufl && pip install . && cd .. && \ + git clone https://bitbucket.org/fenics-project/dijitso && \ + cd dijitso && pip install . && cd .. &&\ + git clone https://bitbucket.org/fenics-project/fiat && \ + cd fiat && pip install . && cd .. && \ + git clone https://bitbucket.org/fenics-project/ffc && \ + cd ffc && \ + sed -i 's|2021.1.0|2019.2.0.dev0|g' setup.py && \ + pip install . && cd .. && \ + rm -rf /tmp/src/* + #RUN apt-get update -yqq && apt-get install libopenmpi-dev -RUN cd /tmp/src/ && \ - git clone --branch=$FENICS_VERSION https://bitbucket.org/fenics-project/dolfin -COPY *.patch /tmp/src/dolfin/ +RUN mkdir -p /tmp/src/ && cd /tmp/src/ && \ + git clone https://bitbucket.org/fenics-project/dolfin +COPY patches.patch /tmp/src/dolfin/ RUN cd /tmp/src/dolfin && \ - git am algorithm.patch && \ - git am boost.patch && \ + git checkout 3eacdb46ed4e6dcdcbfb3b2f5eefa73f32e1b8a8 && \ + git am patches.patch && \ cd .. && \ mkdir dolfin/build && cd dolfin/build && \ cmake .. && make install -ENV PYBIND11_VERSION=2.2.3 +ENV PYBIND11_VERSION=2.4.3 -RUN cd /tmp/src/ && \ +RUN mkdir -p /tmp/src/ && cd /tmp/src/ && \ wget -nc --quiet https://github.com/pybind/pybind11/archive/v${PYBIND11_VERSION}.tar.gz && \ tar -xf v${PYBIND11_VERSION}.tar.gz && \ cd pybind11-${PYBIND11_VERSION} && \ @@ -61,11 +71,13 @@ RUN apt-get update -yqq && \ rm -rf /var/lib/apt/lists/* RUN cd /tmp/src/ && \ - git clone --branch=2019.1.0 https://bitbucket.org/fenics-project/mshr && \ + git clone https://bitbucket.org/fenics-project/mshr && \ + cd mshr && git checkout c27eb18f47cb35d27c863c2db584915659e64c7f && cd .. && \ + . /usr/local/share/dolfin/dolfin.conf && \ mkdir mshr/build && cd mshr/build && \ cmake .. && make install RUN cd /tmp/src/mshr/python && \ pip3 install . -RUN echo "source /usr/local/share/dolfin/dolfin.conf" >> /root/.profile +RUN echo ". /usr/local/share/dolfin/dolfin.conf" >> /root/.bashrc diff --git a/Dockerfile-2019.1.0.post0 b/Dockerfile-2019.1.0.post0 index 325b6e4..239217a 100644 --- a/Dockerfile-2019.1.0.post0 +++ b/Dockerfile-2019.1.0.post0 @@ -1,4 +1,5 @@ -FROM docker.io/python:3.9.7-bullseye +ARG PYTHON_TAG +FROM docker.io/python:$PYTHON_TAG ARG DEBIAN_FRONTEND=noninteractive # dolfin diff --git a/Makefile b/Makefile index 6098f2b..433f24b 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,5 @@ build: 2019.1.0 -latest: - docker build -t fenics -f Dockerfile . - 2019.1.0: docker build -t fenics -t fenics-2019.1.0 -f Dockerfile-2019.1.0 . @@ -12,10 +9,10 @@ latest: SHELL=bash # docker buildx build --platform linux/amd64,linux/arm64 # {3.6.{14..15},3.{7..8}.{11..12},3.9.{6..9},3.10.{0..1}}-{bullseye,buster} 3.{7..8}.{4..10}-buster 3.6.{9..13}-buster -buster: +all: # for TAG in $(shell echo 3.6.{9..13}-buster 3.{7..8}.{4..10}-buster {3.6.{14..15},3.{7..8}.{11..12},3.9.{6..9},3.10.{0..1}}-buster | sort); do - for TAG in $(shell echo 3.{7..8}.{4..10}-buster {3.6.{14..15},3.{7..8}.{11..12},3.9.{6..9},3.10.{0..1}}-buster | sort); do \ - VER=2019.1.0;\ + for TAG in $(shell echo {3.{7..8}.{11..12},3.9.{6..9},3.10.{0..1}}-bullseye | sort); do \ + VER=2019.1.0.post0;\ echo BUILDING $$VER-$$TAG; \ docker pull mindthemath/fenics-arm64:$$VER-$$TAG; \ docker build \ @@ -27,3 +24,12 @@ buster: yes | docker system prune; \ done +buster: + docker build \ + -t docker.io/mindthemath/fenics-arm64:2019.2.0.dev0-3.9.7-buster \ + --build-arg PYTHON_TAG=3.9.7-buster . + +latest: + docker build \ + -t docker.io/mindthemath/fenics-arm64:2019.2.0.dev0-3.6.14-bullseye \ + --build-arg PYTHON_TAG=3.6.14-bullseye .