Skip to content
Draft
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
2 changes: 2 additions & 0 deletions .github/workflows/debuntu_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@ jobs:
MPI=${{ matrix.mpi }}
DISTRO=${{ steps.info.outputs.distro }}
DISTRO_VERSION=${{ steps.info.outputs.distro_version }}
CMAKE_MINIMAL_VERSION_FOR_CATALYST=3.26.0
CATALYST_VERSION=2.0
tags: |
${{ steps.info.outputs.tags }}
75 changes: 73 additions & 2 deletions debuntu/all/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,82 @@ RUN mkdir -p /opt/veloc \
&& ./auto-install.py /opt/veloc


# stage : pre_main image with VeloC
# stage : catalyst builder
FROM pre_main AS builder_catalyst

ARG CATALYST_VERSION
ARG CMAKE_MINIMAL_VERSION_FOR_CATALYST

RUN mkdir -p /opt
ENV HOME=/opt
WORKDIR ${HOME}

RUN set -ex \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
git \
ninja-build \
curl \
&& rm -rf /var/lib/apt/lists/*

RUN <<EORUN
set -ex
#cmake_installed=$(cmake --version | head -1 | cut -f3 -d" ")
#
#mapfile -t sorted < <(printf "%s\n" "$cmake_installed" "$CMAKE_MINIMAL_VERSION_FOR_CATALYST" | sort -V)
#
#cmake_exec=cmake
#if [[ ${sorted[0]} == ${CMAKE_MINIMAL_VERSION_FOR_CATALYST} ]]; then

rejected_cmake_version="$(printf "%s\n" "$(cmake --version | head -1 | cut -f3 -d" ")" "$CMAKE_MINIMAL_VERSION_FOR_CATALYST" | sort -V | head -1)"

if [ "${rejected_cmake_version}" = "${CMAKE_MINIMAL_VERSION_FOR_CATALYST}" ]; then
cmake_exec=cmake
else
curl -LfsSo cmake-bin.tar.gz "https://github.com/Kitware/CMake/releases/download/v"${CMAKE_MINIMAL_VERSION_FOR_CATALYST}"/cmake-"${CMAKE_MINIMAL_VERSION_FOR_CATALYST}"-linux-x86_64.tar.gz"
Comment thread
jbigot marked this conversation as resolved.
Resolved
tar -xf cmake-bin.tar.gz
cmake_exec=${HOME}/cmake-${CMAKE_MINIMAL_VERSION_FOR_CATALYST}-linux-x86_64/bin/cmake
fi

git clone --branch v${CATALYST_VERSION}.0 \
--single-branch \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--single-branch \
--single-branch \
--depth 1 \
--recurse-submodules \
--shallow-submodules \

If that works, that prevents us from downloading the whole history for nothing and handles the submodules at the same time

--depth 1 \
--recurse-submodules \
--shallow-submodules \
https://gitlab.kitware.com/paraview/catalyst.git \
${HOME}/catalyst_clone/
cd ${HOME}/catalyst_clone/
mkdir build

${cmake_exec} -GNinja -DCATALYST_BUILD_TESTING:BOOL=OFF \
-DCATALYST_USE_MPI:BOOL=ON \
-DCATALYST_WRAP_FORTRAN:BOOL=OFF \
-DCATALYST_WRAP_PYTHON:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:PATH=/opt/catalyst/ \
-S ${HOME}/catalyst_clone/ -B ${HOME}/catalyst_clone/build
${cmake_exec} --build ${HOME}/catalyst_clone/build
${cmake_exec} --install ${HOME}/catalyst_clone/build
EORUN


# stage : pre_main image with VeloC and Catalyst
FROM pre_main AS main

ARG DISTRO
ARG DISTRO_VERSION
ARG MPI

# add Catalyst
COPY --from=builder_catalyst /opt/catalyst /opt/catalyst
#ENV catalyst_DIR=/opt/catalyst/lib/cmake/catalyst-${CATALYST_VERSION}
ENV catalyst_ROOT=/opt/catalyst/
RUN echo "/opt/catalyst/lib" > /etc/ld.so.conf.d/image_catalyst.conf \
&& ldconfig

COPY --from=velocdl /opt/veloc /opt/veloc

ENV veloc_ROOT=/opt/veloc
Expand All @@ -127,7 +197,8 @@ WORKDIR ${HOME}
# stage : PDI download for tests
FROM alpine/git AS pdidl

RUN git -C /root clone --recurse-submodules https://github.com/pdidev/pdi.git /root/pdi
#RUN git -C /root clone --recurse-submodules https://github.com/pdidev/pdi.git /root/pdi
RUN git -C /root clone -b catalyst-plugin --recurse-submodules https://github.com/francois-kitware/pdi /root/pdi
Comment on lines +200 to +201

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will have to be reverted before integration



# stage : test
Expand Down
4 changes: 3 additions & 1 deletion spack/3-baselibs/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ BASE_BUILDDEPS="cmake doxygen pkgconf py-setuptools"
# libraries that are required in all cases
BASE_LIBS="py-numpy py-pyyaml python"
# libraries that depend on MPI & are required in all cases
BASE_MPILIBS="py-mpi4py veloc"
BASE_MPILIBS="py-mpi4py veloc libcatalyst+mpi+python"
#TODO: libcatalyst+python was introduced in spack 0.22, switch back to a single list when our minimum requirement goes at or above that
BASE_MPILIBS_OLDSPACK="py-mpi4py veloc libcatalyst+mpi"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BASE_MPILIBS_OLDSPACK="py-mpi4py veloc libcatalyst+mpi"
#TODO: libcatalyst+python was introduced in spack 0.22, switch back to a single list when our minimum requirement goes at or above above that
BASE_MPILIBS_OLDSPACK="py-mpi4py veloc libcatalyst+mpi"

# libraries that are optional because embedded in PDI
OPT_LIBS="paraconf py-pybind11 spdlog"
# libraries that depend on MPI & are optional because embedded in PDI
Expand Down
12 changes: 11 additions & 1 deletion spack/4-mini/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast"

# Add our MPI of choice and base MPI-dependant libs to the environment and install it
RUN spack -e pdienv add -l mpi "${MPI}"
RUN . deps.sh && spack -e pdienv add -l mpilibs ${BASE_MPILIBS}
RUN <<EORUN

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUN <<EORUN
RUN <<EORUN
#TODO: introduced to handle a missing variant in spack<0.22, remove when our minimum requirement goes at or above above that

#TODO: introduced to handle a missing variant in spack<0.22, remove when our minimum requirement goes at or above that
set -e
. deps.sh
if ( spack --version | grep -qs '^1\.' )
then
spack -e pdienv add -l mpilibs ${BASE_MPILIBS}
else
spack -e pdienv add -l mpilibs ${BASE_MPILIBS_OLDSPACK}
fi
EORUN
Comment on lines +20 to +26

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ( spack --version | grep -qs '^1\.' )
then
. deps.sh
spack -e pdienv add -l mpilibs ${BASE_MPILIBS}
else
. deps.sh
spack -e pdienv add -l mpilibs ${BASE_MPILIBS_OLDSPACK}
fi
EORUN
. deps.sh
if ( spack --version | grep -qs '^1\.' )
then
spack -e pdienv add -l mpilibs ${BASE_MPILIBS}
else
spack -e pdienv add -l mpilibs ${BASE_MPILIBS_OLDSPACK}
fi
EORUN

RUN spack -e pdienv concretize -f --reuse
RUN spack -e pdienv install ${SPACK_INSTALL_ARGS}
Loading