Skip to content
Snippets Groups Projects
Commit eea787d3 authored by Philipp Spilger's avatar Philipp Spilger
Browse files

Allow update build cache to run with container image paths of host user

* spack user typically won't be allowed to read the file or its dirname

Change-Id: If54bb738a78e5c70e4b074379b091202c42544c3
parent 0a1a4781
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ source "${SOURCE_DIR}/commons.sh" ...@@ -35,7 +35,7 @@ source "${SOURCE_DIR}/commons.sh"
# update script inside the container # update script inside the container
set +e set +e
# Arugments needed once we switch to singularity3: --writable-tmpfs # Arugments needed once we switch to singularity3: --writable-tmpfs
sudo -Eu spack singularity exec\ sudo -E singularity exec\
-B "${BUILD_CACHE_OUTSIDE}:${BUILD_CACHE_INSIDE}:rw"\ -B "${BUILD_CACHE_OUTSIDE}:${BUILD_CACHE_INSIDE}:rw"\
"${IMAGE_NAME}" \ "${IMAGE_NAME}" \
/opt/spack_install_scripts/update_build_cache_in_container.sh -q || exit 0 sudo -Eu spack /opt/spack_install_scripts/update_build_cache_in_container.sh -q || exit 0
...@@ -82,6 +82,9 @@ if (( quiet == 1 )); then ...@@ -82,6 +82,9 @@ if (( quiet == 1 )); then
args_progress="" args_progress=""
fi fi
# find requires current working directory to be readable by spack user
cd ${MY_SPACK_FOLDER}
get_hashes_to_store \ get_hashes_to_store \
| parallel -r ${args_progress} -j$(nproc) \ | parallel -r ${args_progress} -j$(nproc) \
tar Pcfz "${destination_folder}/{}.tar.gz" \"\$\(spack location -i /{}\)\" tar Pcfz "${destination_folder}/{}.tar.gz" \"\$\(spack location -i /{}\)\"
......
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