Skip to content
Snippets Groups Projects
Commit ec296dcc authored by Eric Müller's avatar Eric Müller :mountain_bicyclist:
Browse files

feat: use apptainer from PATH

Change-Id: I91cf7366e01ebfcadcc1e925afbe87441f844d8a
parent 8aa56b5c
No related branches found
No related tags found
No related merge requests found
......@@ -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}"
......@@ -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 \
......
......@@ -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
......@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment