Build and deploy containers for online reconstruction.
This MR introduces a cbm_online
container that contains the online reconstruction. Container is build and deployed to the registry with a
tag mr<MR_NUMBER>
. Upon merging to master and DC_*
branches, additional containers are deployed tagged with those branch names (Not tested yet). I was able to run the created containers on a local server and on the virgo debug partition.
Container creation is done using multi-stage builds. There are two base images online_dev
and online_runtime
. online_dev
contains all libraries and headers to compile the online code including AMD GPU support via ROCm. online_runtime
is a small stripped down container that primarily contains the libraries needed by the online code at runtime (again including GPU support). To then build cbm_online
, CbmRoot is then compiled in online_dev
and the resulting binaries and libraries are copied into online_runtime
. Inside the container, only the online code is build to reduce compile times and the number of dependencies in online_dev
.
For instructions on how to create all these images, see the included README.
Size of the dev
container in the registry is currently 2.4GB. I was able to reduce runtime
to ~140MB and the final cbm_online
container is then about 170MB.
Note that the current container supports GPU and CPU code simultaneously. However, GPUs are optional and it will happily work even if none are present.
Another note: To speed up the CI, the container deployment doesn't depend on the previous build
step that builds full CbmRoot and runs unittests. Instead containers are created in parallel with build
.
Not in this MR / Future Todos
- We probably want to further automate creation of base-containers, at the very least the scripts should take parameters for FairSoft version and ROCm version
- Also should add
stable
andtesting
tags for base containers. - We might want to tag
cbm_online
containers by commit hash as well - We should probably enable autocleaning of containers: https://git.cbm.gsi.de/computing/cbmroot/-/settings/packages_and_registries/cleanup_image_tags