/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Utilities/ReleaseScripts/scripts/apptainer-check.sh
26 строк
1 KB
Cms Build
Include apptainer check
12 янв 2023, 17:20
12 янв 2023, 17:20
5ac7b0b
Код
Авторство
О чём код?
#!/bin/bash # Check if apptainer (or singularity) is available and that unprivileged user namespace is enabled (needed for nested containers) # It is needed for unit tests in modules HeterogeneousCore/SonicTriton and RecoEcal/EgammaClusterProducers # It avoids TritonService fallback server error if type apptainer >& /dev/null; then echo "has apptainer" CONTAINER_CONFIG="/etc/apptainer/apptainer.conf" else echo "missing apptainer, checking for singularity..." if type singularity >& /dev/null; then echo "has singularity" CONTAINER_CONFIG="/etc/singularity/singularity.conf" else echo "missing singularity also" && exit 1 fi fi if [ -n "$SINGULARITY_CONTAINER" ]; then if grep -q "^allow setuid = no" $CONTAINER_CONFIG && unshare -U echo >/dev/null 2>&1; then echo "has unprivileged user namespace support" else echo "missing unprivileged user namespace support" && exit 1 fi fi