next-exp / nexus

Geant4 simulation framework of the NEXT Collaboration
5 stars 55 forks source link

Automatic build and test using docker #176

Closed jmbenlloch closed 2 years ago

jmbenlloch commented 2 years ago

This PR adds a new mechanism for continuous integration using docker. The total size of the image including Geant4, Root and the conda environment is ~3.8GB.

It is built in several steps, the docker folder contains the definitions for several images:

The new github action included builds nexus and run the tests. An example can be seen here.

When an update is needed, the corresponding Dockerfile will need to be updated, as well as the image in the registry. Now we are using https://registry.cern.ch, which offers no limitations in terms of pulling images.

The docker image could be used directly in several HPC clusters. In those not supporting docker, singularity is usually an option and singularity can build an image from a docker container.

The next step would be to modify the github action, so on every merge to master, a new docker image gets compiled and pushed to the registry automatically. In that way, we would have a pre-compiled version for every status of the master branch. That could be pulled from any production machine.

The size of the new images will be small since only the last layer would be updated (this repo and the compiled version of nexus).