In the definition file for a Singularity container, sourcing Intel Python's setvars.sh from an "%appenv" section (https://sylabs.io/guides/3.6/user-guide/definition_files.html#apps) consistently produces the following error:
source: setvars.sh:230:17: parameter expansion requires a literal
The same line within %appinstall or when running in a singularity shell works as expected.
I have not been able to debug this. I suspect it may be related to sourcing setvars.sh from within an already sourced script, but I haven't designed experiments to test for that yet. Line 230 of setvars.sh seems innocent enough at first glance. If anyone has any insights to this behavior, please let me know.
Tested with Singularity 3.6, Intel Python from offline, single component "Intel Distribution for Python for Linux" installer (l_pythoni37_oneapi_p_2021.1.1.44_offline.sh).