Mate Desktop in a Singularity container?

Do you run GridEngine by any chance? module is a function in an /etc/profile.d file. Some folks have had to add . ~/.bashrc (load a users .bashrc)

Along with script_wrapper we also provide header. that is a header.

  header: | 
    #!/bin/bash
    . ~/.bashrc

You can see this topic for similar issue.