Problem of usage of sen2cor in singularity image

Hi!
I am trying to process sentinel-2 images with sen2cor installed in singularity image (SI). As an OS of SI I am using ubuntu20.04. First of all, while the installing of sen2cor, I got a lot of strange error messages: find: 'file': No such file or directory. But after all, installation is successful. But when I try to check the efficiency, launching L2A_Process --help, I got an error: /Sen2Cor-02.08.00-Linux64/bin/L2A_Process: 5: /Sen2Cor-02.08.00-Linux64/bin/python2.7: not found. But when I check the Sen2Cor-02.08.00-Linux64/bin directory with ls, I see python, python2 and python 2.7 files. I have even tried to grant all permissions to /Sen2Cor-02.08.00-Linux64/bin/python2.7 using chmod 777 and added this path to PYTHONPATH, but nothing helped.

Here is the .def file I am using to create SI:
test.def (556 Bytes)

Adding a response to this old thread because I also had the same issue and this appears to be the only documented question related to the issue:

Sen2Cor (all versions including latest 2.12) requires GDAL to be installed. For Linux this is libgal-dev. As soon as I installed this in my ubuntu:22.04 container, the issues with find: 'file': No such file or directory went away.

I’m not sure if this was undocumented anywhere because it’s considered “common sense” with the community, but the instructions should have considered that newbies would be using it as well…