Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 7 additions & 7 deletions .github/workflows/build_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ jobs:
- name: Read images_version file
id: getversion
run: echo "::set-output name=version::$(cat images_version)"
- name: Release
uses: avakar/tag-and-release@v1
with:
tag_name: v${{ steps.getversion.outputs.version }}
release_name: release_${{ steps.getversion.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
# - name: Release
# uses: avakar/tag-and-release@v1
# with:
# tag_name: v${{ steps.getversion.outputs.version }}
# release_name: release_${{ steps.getversion.outputs.version }}
# env:
# GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
23 changes: 11 additions & 12 deletions dockerfiles/base-build/Dockerfile-gnu
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ARG images_version
FROM flow123d/base-gnu:${images_version}
MAINTAINER Jan Hybs
ARG images_version
ARG boost_version

# Environment variables are part of the images.
# We will use the same base boost package when selectiong specific parts of the BOOST for the install image.
Expand All @@ -14,21 +15,21 @@ ARG images_version
# 2 /usr/bin/gcc-7 7 manual mode
# 3 /usr/bin/gcc-8 8 manual mode
# 4 /usr/bin/gcc-9 9 manual mode
ARG DEFAULT_GCC=/usr/bin/gcc-9
ARG DEFAULT_GCC=/usr/bin/gcc-11

# [g++]
# 0 /usr/bin/g++-9 9 auto mode
# 1 /usr/bin/g++-6 6 manual mode
# 2 /usr/bin/g++-7 7 manual mode
# 3 /usr/bin/g++-8 8 manual mode
# 4 /usr/bin/g++-9 9 manual mode
ARG DEFAULT_GXX=/usr/bin/g++-9
ARG DEFAULT_GXX=/usr/bin/g++-11

# [c++]
# 0 /usr/bin/g++ 20 auto mode
# 1 /usr/bin/clang++ 10 manual mode
# 2 /usr/bin/g++ 20 manual mode
ARG DEFAULT_CXX=/usr/bin/g++-9
ARG DEFAULT_CXX=/usr/bin/g++-11


# install basic set of tools and pandoc tools
Expand All @@ -42,25 +43,23 @@ RUN sudo apt-get update && sudo apt-get install -y \
man \
tree \
gfortran \
gcc-7 g++-7 \
gcc-8 g++-8 \
gcc-9 g++-9 \
gcc-11 g++-11 \
clang \
gdbserver \
valgrind \
oprofile \
pandoc \
ccache \
libboost1.71-dev \
libboost-program-options1.71-dev \
libboost-serialization1.71-dev \
libboost-regex1.71-dev \
libboost-filesystem1.71-dev \
libboost${boost_version}-dev \
libboost-program-options${boost_version}-dev \
libboost-serialization${boost_version}-dev \
libboost-regex${boost_version}-dev \
libboost-filesystem${boost_version}-dev \
libblas-dev \
liblapack-dev \
lib32z1-dev \
libpugixml-dev \
libpython3.9-dev
libpython3-dev


# install doxygen and graphviz, latex
Expand Down
15 changes: 8 additions & 7 deletions dockerfiles/base/Dockerfile-gnu
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# BASE Dockerfile for running flow123d
FROM ubuntu:20.04
FROM ubuntu:22.04
ARG images_version
ARG boost_version

MAINTAINER Jan Březina, Jan Hybš

Expand All @@ -26,19 +27,19 @@ RUN apt-get update && apt-get install -y \
less \
tzdata \
perl \
python3.9 \
python3 \
python3-pip \
openssh-client \
libpsm2-dev \
libboost-program-options1.71.0 \
libboost-serialization1.71.0 \
libboost-regex1.71.0 \
libboost-filesystem1.71.0 \
libboost-program-options${boost_version} \
libboost-serialization${boost_version} \
libboost-regex${boost_version} \
libboost-filesystem${boost_version} \
libblas3 \
liblapack3 \
lib32z1 \
libpugixml1v5 \
libpython3.9 \
libpython3-stdlib \
python3-numpy \
python3-venv \
libxinerama-dev \
Expand Down
111 changes: 100 additions & 11 deletions dockerfiles/flow-dev-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,67 @@
# FLOW-LIBS-DEV-DBG Dockerfile for running flow123d
# BASE-BUILD Dockerfile for running flow123d
ARG images_version
FROM flow123d/base-build-gnu:${images_version} as libs-build
ARG BUILD_TYPE
ARG source_image
FROM ${source_image} as builder

# TODO:
# COPY invalidates all layers even if the chance takes place only in configuration of a single library
# Resolution:
# - break into multiple stages one for each library, copy only relevant directory
# - merge with flow-dev-gnu
# auxiliary build image
# just build libraries Dbug or Release using ${BUILD_TYPE} variable

RUN mkdir /build
COPY libs-build-gnu/common_cmake.mk /build/common_cmake.mk
COPY libs-build-gnu/common_configure.mk /build/common_configure.mk


### YAMLCPP
COPY libs-build-gnu/yamlcpp /build/yamlcpp
ARG ver_yamlcpp
# Need to copy these into ../libs-dbg/Docrefile
RUN echo "*** building YAMLCPP ***"; \
make -C /build/yamlcpp build_type=${BUILD_TYPE} version=$ver_yamlcpp install

### ARMADILO
COPY libs-build-gnu/armadillo /build/armadillo
ARG ver_armadillo
RUN echo "*** building Armadillo ***"; \
make -C /build/armadillo build_type=${BUILD_TYPE} version=$ver_armadillo install

### MPICH
COPY libs-build-gnu/mpich /build/mpich
ARG ver_mpich
RUN echo "*** building MPICH ***"; \
make -C /build/mpich build_type=${BUILD_TYPE} version=$ver_mpich install

### PETSC
COPY libs-build-gnu/petsc /build/petsc
ARG ver_petsc
ARG ver_hypre
RUN echo "*** building PETSC ***"; \
make -C /build/petsc build_type=${BUILD_TYPE} mpich_lib=mpich_${ver_mpich} version=${ver_petsc} hypre_version=${ver_hypre} install

### BDDCML
COPY libs-build-gnu/bddcml /build/bddcml
ARG ver_bddcml
RUN echo "*** building BDDCML ***"; \
make -C /build/bddcml build_type=${BUILD_TYPE} version=${ver_bddcml} mpich_lib=mpich_${ver_mpich} petsc_lib=petsc_${ver_petsc} install

### PERMON
COPY libs-build-gnu/permon /build/permon
ARG ver_permon
RUN echo "*** building PERMON ***"; \
make -C /build/permon build_type=${BUILD_TYPE} version=${ver_permon} petsc_lib=petsc_${ver_petsc} install



##################################
# Target flow-dev-gnu image

ARG images_version
FROM flow123d/base-build-gnu:${images_version}
MAINTAINER Jan Hybs
FROM flow123d/base-build-gnu:${images_version} as flow-dev-gnu
MAINTAINER Jan Brezina

ARG images_version
ARG BUILD_TYPE
Expand All @@ -20,15 +74,50 @@ ARG ver_bddcml
ARG ver_permon

# install libraries
COPY --from=builder /usr/local/yamlcpp_$ver_yamlcpp /usr/local/yamlcpp_$ver_yamlcpp
COPY --from=builder /usr/local/armadillo_${ver_armadillo} /usr/local/armadillo_${ver_armadillo}
COPY --from=builder /usr/local/mpich_${ver_mpich} /usr/local/mpich_${ver_mpich}
COPY --from=builder /usr/local/petsc_${ver_petsc} /usr/local/petsc_${ver_petsc}
COPY --from=builder /usr/local/bddcml_${ver_bddcml} /usr/local/bddcml_${ver_bddcml}
COPY --from=builder /usr/local/permon_${ver_permon} /usr/local/permon_${ver_permon}
COPY --from=libs-build /usr/local/yamlcpp_$ver_yamlcpp /usr/local/yamlcpp_$ver_yamlcpp
COPY --from=libs-build /usr/local/armadillo_${ver_armadillo} /usr/local/armadillo_${ver_armadillo}
COPY --from=libs-build /usr/local/mpich_${ver_mpich} /usr/local/mpich_${ver_mpich}
COPY --from=libs-build /usr/local/petsc_${ver_petsc} /usr/local/petsc_${ver_petsc}
COPY --from=libs-build /usr/local/bddcml_${ver_bddcml} /usr/local/bddcml_${ver_bddcml}
COPY --from=libs-build /usr/local/permon_${ver_permon} /usr/local/permon_${ver_permon}

RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \
python3-vtk7

RUN echo ${BUILD_TYPE} ${images_version} >/.dockerversion


###################################
# Target install-gnu image


ARG images_version
FROM flow123d/base-gnu:${images_version} as install-gnu
MAINTAINER Jan Brezina

ARG images_version
ARG BUILD_TYPE=Release


ARG ver_yamlcpp
ARG ver_armadillo
ARG ver_mpich
ARG ver_petsc
ARG ver_bddcml
ARG ver_permon

# install libraries
COPY --from=libs-build /usr/local/yamlcpp_$ver_yamlcpp /usr/local/yamlcpp_$ver_yamlcpp
COPY --from=libs-build /usr/local/armadillo_${ver_armadillo} /usr/local/armadillo_${ver_armadillo}
COPY --from=libs-build /usr/local/mpich_${ver_mpich} /usr/local/mpich_${ver_mpich}
COPY --from=libs-build /usr/local/petsc_${ver_petsc} /usr/local/petsc_${ver_petsc}
COPY --from=libs-build /usr/local/bddcml_${ver_bddcml} /usr/local/bddcml_${ver_bddcml}
COPY --from=libs-build /usr/local/permon_${ver_permon} /usr/local/permon_${ver_permon}

RUN echo ${BUILD_TYPE} ${images_version} >/.dockerversion; \
echo /usr/local/mpich_${ver_mpich}/bin/mpicc >/.mpiccpath; \
ln -s /usr/local/${ver_mpich}/bin/mpirun /usr/bin/mpirun; \
ln -s /usr/local/${ver_mpich}/bin/mpicc /usr/bin/mpicc; \
ln -s /usr/local/${ver_mpich}/bin/mpicc /usr/bin/mpicxx; \
ln -s /usr/local/${ver_mpich}/bin/mpicc /usr/bin/mpif90; \
ln -s /usr/local/${ver_mpich}/bin/mpicc /usr/bin/mpifort
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ base_name=bddcml-$(version)
clear=false


build_root=/libs-build-gnu
build_root=/build
build_dir = $(build_root)/$(library)/build_$(build_type)
# package_dir = $(build_root)/packages
# package_name = $(library)_$(build_type)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


package_name ?= $(library)_$(build_type)
build_root=/libs-build-gnu
build_root=/build
build_dir = $(build_root)/$(library)/build_$(build_type)
# package_dir = $(build_root)/packages
# package=$(package_dir)/$(package_name).tar.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# 'package-name' - optional, default is $(library)


build_root=/libs-build-gnu
build_root=/build
package_name ?= $(library)_$(build_type)
build_dir = $(build_root)/$(library)/build_$(build_type)

Expand Down Expand Up @@ -39,13 +39,14 @@ $(CURDIR)/$(install_file):
wget $(url)

$(build_dir)/configure: clean_build $(CURDIR)/$(install_file)
if [ ! -d $(build_dir) ]; then \
if [ ! -d $(build_dir) -o ! -x $(build_dir)/configure ]; then \
cmake -E tar x $(install_file); \
mv $(base_name) build_$(build_type); \
fi

lib_makefile=$(build_dir)/Makefile
$(lib_makefile): $(build_dir)/configure
ls $(build_dir)
cd $(build_dir) && ./configure --prefix=$(install_prefix) $(configure_options)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ url=http://flow.nti.tul.cz/libraries/mpich-${version}.tar.gz
base_name=mpich-$(version)

conf_opt_Debug= \
FFLAGS=-fallow-argument-mismatch \
FCFLAGS=-fallow-argument-mismatch \
--with-device=ch4:ofi

conf_opt_Release= \
FFLAGS=-fallow-argument-mismatch \
FCFLAGS=-fallow-argument-mismatch \
--enable-fast=O3,ndebug \
--disable-error-checking \
--without-timing \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ base_name=$(library)-$(version)
clear=true


build_root=/libs-build-gnu
build_root=/build
build_dir = $(build_root)/$(library)/build_$(build_type)
# package_dir = $(build_root)/packages
# package_name = $(library)_$(build_type)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ base_name=petsc-$(version)
package_name = $(library)_$(build_type)
clear=false

build_root=/libs-build-gnu
build_root=/build
build_dir = $(build_root)/$(library)/build_$(build_type)
package_dir = $(build_root)/packages
n_jobs = 5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Simple makefile for building and packaging project Yaml cpp

library=yamlcpp
url=https://flow.nti.tul.cz/libraries/yaml-cpp-yaml-cpp-$(version).zip
base_name=yaml-cpp-yaml-cpp-$(version)
url=https://flow.nti.tul.cz/libraries/yaml-cpp-$(version).zip
base_name=yaml-cpp-$(version)
cmake_options="-DYAML_BUILD_SHARED_LIBS=ON"

# In order to combine staticaly linked yamlcpp with dynamicaly linked res of the code.
CXX_FLAGS=-fPIC

# TODO: shared yamplcpp


include ../common_cmake.mk


36 changes: 0 additions & 36 deletions dockerfiles/install-gnu/Dockerfile

This file was deleted.

Loading