diff --git a/install_spack_env.sh b/install_spack_env.sh index 8de4f7df37a81b20618a26a5d049aafad9622038..312326254bde83a0a532d0e3690aaf0aa97166b2 100644 --- a/install_spack_env.sh +++ b/install_spack_env.sh @@ -79,52 +79,6 @@ if [[ ! $(spack mirror list | grep local_cache) ]]; then spack mirror add local_cache ${SPACK_CACHE_BUILD} fi -# install platform compiler (extract version from packages.yaml) -if [ $SYSTEMNAME == ebrainslab ] -then - EBRAINS_SPACK_COMPILER=$(grep 'compiler' $EBRAINS_REPO/site-config/$SYSTEMNAME/packages.yaml | awk -F'[][]' '{ print $2 }') - spack compiler find - spack load $EBRAINS_SPACK_COMPILER || { - # dump dag to file - spack spec -y $EBRAINS_SPACK_COMPILER arch=x86_64 > "/tmp/req_compiler.yaml" - if [ -n "${OCI_CACHE_PREFIX}" ]; then - # fetch missing sources (if packages not yet installed) - python3 ${YASHCHIKI_HOME}/fetch_cached_sources.py \ - --local-cache=${SPACK_CACHE_SOURCE} \ - --remote-cache-type=oci \ - --remote-cache=${OCI_CACHE_PREFIX}/source_cache \ - --yashchiki-home=${YASHCHIKI_HOME} \ - /tmp/compiler_missing_paths_sources.dat /tmp/req_compiler.yaml - # fetch missing build results (if packages not yet installed) - python3 ${YASHCHIKI_HOME}/fetch_cached_buildresults.py \ - --local-cache=${SPACK_CACHE_BUILD}/build_cache \ - --remote-cache-type=oci \ - --remote-cache=${OCI_CACHE_PREFIX}/build_cache \ - --yashchiki-home=${YASHCHIKI_HOME} \ - /tmp/compiler_missing_paths_buildresults.dat /tmp/req_compiler.yaml - fi - spack install --no-check-signature -y -j$SPACK_JOBS $EBRAINS_SPACK_COMPILER arch=x86_64 - if [ -n "${OCI_CACHE_PREFIX}" ] && [ "${UPDATE_SPACK_OCI_CACHES:-false}" = "true" ]; then - echo "Performing update of the source cache (for base compiler)" - python3 ${YASHCHIKI_HOME}/update_cached_sources.py \ - --local-cache=${SPACK_CACHE_SOURCE} \ - --remote-cache-type=oci \ - --remote-cache=${OCI_CACHE_PREFIX}/source_cache \ - /tmp/compiler_missing_paths_sources.dat - # push previously missing (but now installed) packages to the local cache - spack buildcache create --unsigned ${SPACK_CACHE_BUILD} ${EBRAINS_SPACK_COMPILER} && ret=$? || ret=$? - # upload packages from local to remote cache - echo "Performing update of the build cache (for base compiler)" - python3 ${YASHCHIKI_HOME}/update_cached_buildresults.py \ - --local-cache=${SPACK_CACHE_BUILD}/build_cache \ - --remote-cache-type=oci \ - --remote-cache=${OCI_CACHE_PREFIX}/build_cache \ - /tmp/compiler_missing_paths_buildresults.dat - fi - spack load $EBRAINS_SPACK_COMPILER - } -fi - spack compiler find # create environment if it does not exist