Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a13643c
Feature: Add docker container for clang-based compilation
spenke91 Jan 5, 2026
c13db0b
Actually push the new image
spenke91 Jan 5, 2026
be7b618
Update to Ubuntu 22.04
spenke91 Jan 5, 2026
4d09f03
Add cmake and ninja-build packages
spenke91 Jan 5, 2026
2aab7d7
Avoid installing gcc in clang image
spenke91 Jan 6, 2026
85e2be9
Install ca-certificates
spenke91 Jan 6, 2026
e662396
Removed --no-install-recommends again
spenke91 Jan 6, 2026
e170395
Try building VTK with Clang
spenke91 Jan 13, 2026
6706765
Use Clang for VTK build
spenke91 Jan 13, 2026
b8b892d
Add some more vtk dependencies
spenke91 Jan 13, 2026
8b87768
Add vtk install path
spenke91 Jan 13, 2026
674c76f
Use make for VTK library
spenke91 Jan 13, 2026
065fa47
Try again
spenke91 Jan 13, 2026
da9be58
Try again
spenke91 Jan 13, 2026
367a16f
Add HDF5 and NetCDF
spenke91 Jan 13, 2026
3870bae
Use ninja instead of make for cmake-based build chains
spenke91 Jan 13, 2026
c2b7a5b
Try other hdf5 url
spenke91 Jan 13, 2026
1880f6c
Fix typo
spenke91 Jan 13, 2026
4600074
Try again
spenke91 Jan 13, 2026
7adcc16
More fixes
spenke91 Jan 13, 2026
50212fe
Remove whitespace.
spenke91 Jan 13, 2026
1033e0e
Try clean build dirs for cmake builds
spenke91 Jan 13, 2026
1c87fc6
Change order and try different flags for OCCT
spenke91 Jan 14, 2026
1b22c1a
Try more OCCT flags
spenke91 Jan 14, 2026
372e2a7
Try again
spenke91 Jan 14, 2026
eea4627
Try again
spenke91 Jan 14, 2026
5ae4c6f
Try again
spenke91 Jan 14, 2026
2430cbf
Try again
spenke91 Jan 14, 2026
9e8d9ba
Try libtbb2
spenke91 Jan 14, 2026
373806f
Add PATH IGNOREs again
spenke91 Jan 14, 2026
ce340e2
Try stuff
spenke91 Jan 14, 2026
908f79e
Trying more desperate stuff
spenke91 Jan 14, 2026
c2b9cf2
typos
spenke91 Jan 14, 2026
006027f
Getting desperate
spenke91 Jan 14, 2026
9e7ec75
Test without TBB
spenke91 Jan 14, 2026
75f54c8
Try with TBB again
spenke91 Jan 14, 2026
57bc8a0
Try pushing the image
spenke91 Jan 14, 2026
b434792
Build container again, but only with OCC
spenke91 Jan 15, 2026
d9c37e8
For debugging, try without TBB
spenke91 Jan 15, 2026
199146d
Try with TBB again
spenke91 Jan 15, 2026
31ac1fe
Fix typo
spenke91 Jan 15, 2026
1e0ac74
Build without TBB again
spenke91 Jan 16, 2026
96ed88b
Rearranged some paths
spenke91 Jan 16, 2026
e0c83e8
Try HDF5 and NETCDF in custom version
spenke91 Jan 16, 2026
da5d00c
Major update
spenke91 Jan 16, 2026
17660f2
Try again
spenke91 Jan 16, 2026
4a4bb70
Fix typo
spenke91 Jan 16, 2026
22aa932
Build light version as clang dependencies
spenke91 Jan 16, 2026
a76814f
Build openmpi with gfortran (in addition to Clang)
spenke91 Jan 16, 2026
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
131 changes: 75 additions & 56 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,72 +9,91 @@ on:
workflow_dispatch:

jobs:
t8_dependencies:
t8_clang_dependencies:
strategy:
fail-fast: false
fail-fast: true
matrix:
include:
include:
- os: ubuntu-latest
target_os: ubuntu
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Build the docker image
run: |
docker build --tag dlramr/t8code-${{ matrix.target_os }}:t8-dependencies dependencies/${{ matrix.target_os }}
docker build --tag dlramr/t8code-${{ matrix.target_os }}:t8-clang-dependencies clang/${{ matrix.target_os }}
- name: Push the docker image
env: # Set the secret as an input
docker_token: ${{ secrets.DOCKER_TOKEN }}
run: |
echo ${{ env.docker_token }} | docker login --username dlramr --password-stdin
docker push dlramr/t8code-${{ matrix.target_os }}:t8-dependencies
with_t8code:
needs: t8_dependencies
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target_os: ubuntu
tag: t8-1.0.0
t8code_version: 1.0.0
- os: ubuntu-latest
target_os: ubuntu
tag: t8-1.1.0
t8code_version: 1.1.0
- os: ubuntu-latest
target_os: ubuntu
tag: t8-1.2.0
t8code_version: 1.2.0
- os: ubuntu-latest
target_os: ubuntu
tag: t8-1.3.0
t8code_version: 1.3.0
- os: ubuntu-latest
target_os: ubuntu
tag: t8-1.4.1
t8code_version: 1.4.1
- os: ubuntu-latest
target_os: ubuntu
tag: t8-1.5.0
t8code_version: 1.5.0
- os: ubuntu-latest
target_os: ubuntu
tag: t8-1.6.1
t8code_version: 1.6.1
- os: ubuntu-latest
target_os: ubuntu
tag: t8-2.0.0
t8code_version: 2.0.0
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Build the docker image
run: |
docker build --build-arg t8code_version=${{ matrix.t8code_version}} --tag dlramr/t8code-${{ matrix.target_os }}:${{ matrix.tag }} t8code/${{ matrix.target_os }}
- name: Push the docker image
env: # Set the secret as an input
docker_token: ${{ secrets.DOCKER_TOKEN }}
run: |
echo ${{ env.docker_token }} | docker login --username dlramr --password-stdin
docker push dlramr/t8code-${{ matrix.target_os }}:${{ matrix.tag }}
docker push dlramr/t8code-${{ matrix.target_os }}:t8-clang-dependencies
# t8_dependencies:
# strategy:
# fail-fast: false
# matrix:
# include:
# - os: ubuntu-latest
# target_os: ubuntu
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2
# - name: Build the docker image
# run: |
# docker build --tag dlramr/t8code-${{ matrix.target_os }}:t8-dependencies dependencies/${{ matrix.target_os }}
# - name: Push the docker image
# env: # Set the secret as an input
# docker_token: ${{ secrets.DOCKER_TOKEN }}
# run: |
# echo ${{ env.docker_token }} | docker login --username dlramr --password-stdin
# docker push dlramr/t8code-${{ matrix.target_os }}:t8-dependencies
# with_t8code:
# needs: t8_dependencies
# strategy:
# fail-fast: false
# matrix:
# include:
# - os: ubuntu-latest
# target_os: ubuntu
# tag: t8-1.0.0
# t8code_version: 1.0.0
# - os: ubuntu-latest
# target_os: ubuntu
# tag: t8-1.1.0
# t8code_version: 1.1.0
# - os: ubuntu-latest
# target_os: ubuntu
# tag: t8-1.2.0
# t8code_version: 1.2.0
# - os: ubuntu-latest
# target_os: ubuntu
# tag: t8-1.3.0
# t8code_version: 1.3.0
# - os: ubuntu-latest
# target_os: ubuntu
# tag: t8-1.4.1
# t8code_version: 1.4.1
# - os: ubuntu-latest
# target_os: ubuntu
# tag: t8-1.5.0
# t8code_version: 1.5.0
# - os: ubuntu-latest
# target_os: ubuntu
# tag: t8-1.6.1
# t8code_version: 1.6.1
# - os: ubuntu-latest
# target_os: ubuntu
# tag: t8-2.0.0
# t8code_version: 2.0.0
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2
# - name: Build the docker image
# run: |
# docker build --build-arg t8code_version=${{ matrix.t8code_version}} --tag dlramr/t8code-${{ matrix.target_os }}:${{ matrix.tag }} t8code/${{ matrix.target_os }}
# - name: Push the docker image
# env: # Set the secret as an input
# docker_token: ${{ secrets.DOCKER_TOKEN }}
# run: |
# echo ${{ env.docker_token }} | docker login --username dlramr --password-stdin
# docker push dlramr/t8code-${{ matrix.target_os }}:${{ matrix.tag }}
114 changes: 114 additions & 0 deletions clang/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
FROM ubuntu:22.04
LABEL org.opencontainers.image.authors="Thomas Spenke <thomas.spenke@dlr.de>"
LABEL Description="Ubuntu 22.04 with clang and openmpi setup to be uses with t8code"
SHELL ["/bin/bash", "-c"]

# Set vtk version
ARG vtk_version=9.1.0
ARG vtk_library_version=9.1

# Set openmpi version
ARG ompi_version=4.1.6
ARG ompi_library_version=4.1

# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV LIBRARY_PATH=/usr/local/lib
ENV LD_LIBRARY_PATH=/usr/local/lib
ENV CUSTOM_CLANG_INSTALL=/custom_clang_install
ENV CUSTOM_CLANG_BUILD=/custom_clang_build

# Set install paths for openmpi and vtk
ENV OMPI_INSTALL_PATH=$CUSTOM_CLANG_INSTALL/openmpi_clang
ENV VTK_INSTALL_PATH=$CUSTOM_CLANG_INSTALL/vtk_clang

#######################################################
# Install software requirements and build tools #
#######################################################

# Install required packages (without recommends to avoid gcc).
RUN apt-get update -y && apt-get upgrade -y; \
apt-get install -y wget \
sudo \
tar \
lld \
make \
cmake \
ninja-build \
libc6-dev \
libc++-dev \
libc++abi-dev \
pkg-config \
git \
clang \
gfortran \
ca-certificates \
autoconf automake libtool m4 \
zlib1g-dev libcurl4-openssl-dev \
# Added for vtk library
libgl1-mesa-dev libx11-dev libxmu-dev libxi-dev \
libxt-dev libxrender-dev libxrandr-dev \
libwayland-dev wayland-protocols \
libfontconfig1-dev libfreetype6-dev \
libxkbcommon-dev libdrm-dev \
# install opengl libs
xorg-dev \
libglu1-mesa-dev \
freeglut3-dev \
libglew-dev \
libglu1-mesa-dev \
libgl1-mesa-dev \
# install OpenCASCADE
libocct-foundation-dev \
libocct-modeling-algorithms-dev\
libocct-modeling-data-dev \
# install NetCDF
libnetcdf-dev

# Prepare folders once
RUN rm -rf $CUSTOM_CLANG_BUILD && mkdir -p $CUSTOM_CLANG_BUILD && \
rm -rf $CUSTOM_CLANG_INSTALL && mkdir -p $CUSTOM_CLANG_INSTALL

# Install openmpi with clang compiler.
RUN cd $CUSTOM_CLANG_BUILD; \
wget https://download.open-mpi.org/release/open-mpi/v${ompi_library_version}/openmpi-${ompi_version}.tar.gz; \
tar xf openmpi-${ompi_version}.tar.gz; \
cd openmpi-${ompi_version}; \
CC=clang CXX=clang++ FC=gfortran ./configure --prefix=$OMPI_INSTALL_PATH; \
make -j$(nproc); \
make install

# Add OpenMPI to paths and environment variables
ENV PATH="$OMPI_INSTALL_PATH/bin:$PATH"
ENV LIBRARY_PATH="$OMPI_INSTALL_PATH/lib:$LIBRARY_PATH"
ENV LD_LIBRARY_PATH="$OMPI_INSTALL_PATH/lib:$LD_LIBRARY_PATH"
ENV CPATH="$OMPI_INSTALL_PATH/include:$CPATH"

# Install vtk library with clang compiler
RUN cd $CUSTOM_CLANG_BUILD; \
git clone https://github.com/Kitware/VTK.git; \
cd VTK; \
git checkout v${vtk_version}; \
# configure build with cmake
rm -rf build && mkdir -p build && cd build ; \
cmake .. \
-DCMAKE_C_COMPILER=${OMPI_INSTALL_PATH}/bin/mpicc \
-DCMAKE_CXX_COMPILER=${OMPI_INSTALL_PATH}/bin/mpicxx \
-DCMAKE_INSTALL_PREFIX=${VTK_INSTALL_PATH} \
-DBUILD_TESTING=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DVTK_USE_MPI=ON \
-DVTK_GROUP_ENABLE_MPI=YES \
-GNinja; \
# build and install vtk
ninja -j4; \
ninja install -j4

# Add NetCDF to paths and environment variables
ENV PATH="$VTK_INSTALL_PATH/bin:$PATH"
ENV LIBRARY_PATH="$VTK_INSTALL_PATH/lib:$LIBRARY_PATH"
ENV LD_LIBRARY_PATH="$VTK_INSTALL_PATH/lib:$LD_LIBRARY_PATH"
ENV CPATH="$VTK_INSTALL_PATH/include:$CPATH"

# Clean up build directories
RUN rm -rf $CUSTOM_CLANG_BUILD