Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure we build multiplatform. #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 28 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# Use no-cache option to force rebuild
# DOCKER_BUILD=docker build --no-cache
DOCKER_BUILD=docker build
DOCKER_BUILD=docker buildx build --push --platform linux/amd64,linux/arm64 --output type=registry

# Repos:
# ppa:ginggs/deal.ii-backports
Expand Down Expand Up @@ -101,26 +102,23 @@ dependencies-focal-v9.3.0:
dependencies-focal:
$(DOCKER_BUILD) -t dealii/dependencies:focal \
--build-arg IMG=focal \
--build-arg VERSION=9.4.0-1ubuntu2~bpo20.04.1~ppa1 \
--build-arg REPO=ppa:ginggs/deal.ii-9.4.0-backports \
--build-arg CLANG_VERSION=11 \
--build-arg VERSION=9.5.1-1~ubuntu20.04.1~ppa1 \
--build-arg REPO=ppa:ginggs/deal.ii-9.5.1-backports \
--build-arg CLANG_VERSION=16 \
--build-arg CLANG_REPO=https://github.com/dealii/dealii/releases/download/v9.3.0/ \
dependencies
docker push dealii/dependencies:focal

dependencies-jammy:
$(DOCKER_BUILD) -t dealii/dependencies:jammy \
$(DOCKER_BUILD) \
-t dealii/dependencies:jammy \
-t dealii/dependencies:latest \
--build-arg IMG=jammy \
--build-arg VERSION=9.4.0-1ubuntu2~bpo22.04.1~ppa1 \
--build-arg REPO=ppa:ginggs/deal.ii-9.4.0-backports \
--build-arg CLANG_VERSION=11 \
--build-arg CLANG_REPO=https://github.com/dealii/dealii/releases/download/v9.3.0/ \
--build-arg VERSION=9.5.1-1~ubuntu22.04.1~ppa2 \
--build-arg REPO=ppa:ginggs/deal.ii-9.5.1-backports \
--build-arg CLANG_VERSION=16 \
--build-arg CLANG_REPO=https://github.com/dealii/dealii/releases/download/v9.5.1/ \
dependencies
docker push dealii/dependencies:jammy
docker tag dealii/dependencies:jammy dealii/dependencies:latest
docker tag dealii/dependencies:jammy dealii/dependencies:jammy-v9.4.0
docker push dealii/dependencies:latest
docker push dealii/dependencies:jammy-v9.4.0

v9.4.2-focal:
$(DOCKER_BUILD) -t dealii/dealii:v9.4.2-focal \
Expand Down Expand Up @@ -153,8 +151,23 @@ v9.5.0-jammy:
--build-arg PROCS=12 \
github
docker push dealii/dealii:v9.5.0-jammy
docker tag dealii/dealii:v9.5.0-jammy dealii/dealii:latest
docker push dealii/dealii:latest

v9.5.1-focal:
$(DOCKER_BUILD) -t dealii/dealii:v9.5.1-focal \
--build-arg IMG=focal \
--build-arg VER=v9.5.1 \
--build-arg PROCS=12 \
github
docker push dealii/dealii:v9.5.1-focal

v9.5.1-jammy:
$(DOCKER_BUILD) \
-t dealii/dealii:v9.5.1-jammy \
-t dealii/dealii:latest \
--build-arg IMG=jammy \
--build-arg VER=v9.5.1 \
--build-arg PROCS=12 \
github

all: dependencies-focal v9.5.0-focal dependencies-jammy v9.5.0-jammy

Expand Down
14 changes: 7 additions & 7 deletions dependencies/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ RUN apt-get update && apt-get install -y software-properties-common \
&& rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

RUN wget ${CLANG_REPO}/clang-format-${CLANG_VERSION}-linux.tar.gz \
&& tar xfv clang* && cp clang-${CLANG_VERSION}/bin/clang-format /usr/local/bin/ \
Expand Down Expand Up @@ -106,10 +106,10 @@ RUN cd /usr/src && \
ninja install && cd ../ && rm -rf build

RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANG=en_US.UTF-8

RUN ldconfig
ENV PYTHONPATH "/usr/local/lib/python3.8/site-packages/"
ENV PYTHONPATH="/usr/local/lib/python3.8/site-packages/"

# add and enable the default user
ARG USER=dealii
Expand All @@ -120,7 +120,7 @@ RUN adduser $USER sudo; echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# make sure everything is in place
RUN chown -R $USER:$USER /home/$USER
USER $USER
ENV HOME /home/$USER
ENV USER $USER
ENV OMPI_MCA_btl "^vader"
ENV HOME=/home/$USER
ENV USER=$USER
ENV OMPI_MCA_btl="^vader"
WORKDIR $HOME
10 changes: 10 additions & 0 deletions jammy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ RUN apt-get update && apt-get install -y software-properties-common \
&& apt-get update && apt-get install -y \
git \
libdeal.ii-dev=$VERSION \
libgmp-dev \
libgtest-dev \
locales \
ninja-build \
numdiff \
Expand All @@ -30,6 +32,14 @@ RUN wget ${CLANG_REPO}/clang-format-${CLANG_VERSION}-linux.tar.gz \
&& tar xfv clang* && cp clang-${CLANG_VERSION}/bin/clang-format /usr/local/bin/ \
&& rm -rf clang*

# Symengine
RUN cd /usr/local/src && \
wget https://github.com/symengine/symengine/releases/download/v0.8.1/symengine-0.8.1.tar.gz && \
tar xvfz symengine-0.8.1.tar.gz && rm symengine-0.8.1.tar.gz &&\
cd symengine-0.8.1 && mkdir build && cd build && \
cmake -GNinja .. && ninja -j12 && ninja install && \
cd .. && rm -rf build

# add and enable the default user
ARG USER=dealii
RUN adduser --disabled-password --gecos '' $USER
Expand Down