github.com/apptainer/singularity@v3.1.1+incompatible/etc/init (about)

     1  # This will be sourced before launching a Singularity container.
     2  # Any variables prefixed with "SINGULARITYENV_" will be transposed
     3  # properly into the container. For example:
     4  # SINGULARITYENV_LD_LIBRARY_PATH -> LD_LIBRARY_PATH
     5  
     6  # Environment modules if set, cause errors in containers
     7  unset module
     8  unset ml
     9  
    10  # Bash env has been known to cause issues in containers
    11  unset BASH_ENV
    12  
    13  # Provide a sane path within the container
    14  if [ -z ${SINGULARITYENV_PATH+x} ]; then
    15      SINGULARITYENV_PATH="/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin"
    16  else
    17      SINGULARITYENV_PATH="$SINGULARITYENV_PATH:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin"
    18  fi
    19  
    20  # Don't save the shell's HISTFILE
    21  SINGULARITYENV_HISTFILE=""
    22  
    23  export SINGULARITYENV_PATH SINGULARITYENV_HISTFILE