Does the above example work? If not, how would you debug it?
***
For the same example, using a **hybrid** approach, here is a definition file. The important changes are than openmpi is downloaded and built within the post section of the .def file, and then the environment sets the OMPI variables to use the openmpi version within the container: