From ec296dcc52907eb61a2ad10f77c127ba8d67c625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20M=C3=BCller?= <mueller@kip.uni-heidelberg.de> Date: Mon, 22 Jul 2024 17:16:23 +0200 Subject: [PATCH] feat: use apptainer from PATH Change-Id: I91cf7366e01ebfcadcc1e925afbe87441f844d8a --- lib/yashchiki/build_image.sh | 2 +- lib/yashchiki/build_sandbox.sh | 2 +- lib/yashchiki/update_build_cache.sh | 4 ++-- share/yashchiki/utils/public.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/yashchiki/build_image.sh b/lib/yashchiki/build_image.sh index 6d490c21..7fae0330 100755 --- a/lib/yashchiki/build_image.sh +++ b/lib/yashchiki/build_image.sh @@ -10,4 +10,4 @@ if test -f "${YASHCHIKI_IMAGE_NAME}"; then exit 1 fi -/skretch/opt/apptainer/1.2.5/bin/apptainer build --fakeroot ${YASHCHIKI_IMAGE_NAME} "${TARGET_FOLDER}" +apptainer build --fakeroot ${YASHCHIKI_IMAGE_NAME} "${TARGET_FOLDER}" diff --git a/lib/yashchiki/build_sandbox.sh b/lib/yashchiki/build_sandbox.sh index 19d3e2d1..dc4334ed 100755 --- a/lib/yashchiki/build_sandbox.sh +++ b/lib/yashchiki/build_sandbox.sh @@ -18,7 +18,7 @@ TARGET_FOLDER="${YASHCHIKI_SANDBOXES}/${CONTAINER_STYLE}" mkdir -p ${YASHCHIKI_SANDBOXES} -/skretch/opt/apptainer/1.2.5/bin/apptainer build \ +apptainer build \ --bind ${YASHCHIKI_CACHES_ROOT}/download_cache:/opt/spack/var/spack/cache \ --bind ${YASHCHIKI_CACHES_ROOT}/spack_ccache:/opt/ccache \ --bind ${YASHCHIKI_CACHES_ROOT}/build_caches:/opt/build_cache \ diff --git a/lib/yashchiki/update_build_cache.sh b/lib/yashchiki/update_build_cache.sh index 4a578035..306fb699 100755 --- a/lib/yashchiki/update_build_cache.sh +++ b/lib/yashchiki/update_build_cache.sh @@ -28,8 +28,8 @@ source "${SOURCE_DIR}/commons.sh" # since the spack user cannot read home of the host user we need to mount the # update script inside the container set +e -# Arugments needed once we switch to singularity3: --writable-tmpfs -/skretch/opt/apptainer/1.2.5/bin/apptainer exec\ +# Arguments needed once we switch to singularity3: --writable-tmpfs +apptainer exec\ -B "${BUILD_CACHE_OUTSIDE}:${BUILD_CACHE_INSIDE}:rw"\ "${IMAGE_NAME}" \ /opt/spack_install_scripts/update_build_cache_in_container.sh -j ${YASHCHIKI_JOBS} -q || exit 0 diff --git a/share/yashchiki/utils/public.sh b/share/yashchiki/utils/public.sh index 98b8f179..c3704709 100755 --- a/share/yashchiki/utils/public.sh +++ b/share/yashchiki/utils/public.sh @@ -69,7 +69,7 @@ check_container_inner() { fi # check that there are no blacklisted packages in the container - if /skretch/opt/apptainer/1.2.5/bin/apptainer shell "${container}" -l \ + if apptainer shell "${container}" -l \ -c "spack find | grep -q \"$(get_grep_pattern_blacklisted)\"" \ &>/dev/null; then # do NOT use container if blacklisted package present -- GitLab