Skip to content
Snippets Groups Projects
Commit 8c0b2d45 authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

minor changes to installation script

parent 09c7f4a7
No related branches found
No related tags found
No related merge requests found
......@@ -7,16 +7,17 @@
# (if the specified spack instance doesn't exist, it also creates it)
# ===========================================================================================================
INSTALLATION_ROOT=$1
SPACK_VERSION=$2
EBRAINS_REPO=$3
EBRAINS_SPACK_ENV=$4
INSTALLATION_ROOT=$1 # where to set up the installation
SPACK_VERSION=$2 # which spack version to use
EBRAINS_REPO=$3 # location of ebrains-spack-builds repository
EBRAINS_SPACK_ENV=$4 # name of EBRAINS Spack environment to be created/updated
# specify location of .spack dir (by default in ~)
# this is where cache and configuration settings are stored
export SPACK_USER_CACHE_PATH=$INSTALLATION_ROOT/spack/.spack
export SPACK_USER_CONFIG_PATH=$INSTALLATION_ROOT/spack/.spack
# initial setup: clone spack if spack dir doesn't already exist and activate
# initial setup: clone spack if spack dir doesn't already exist
if [ ! -d $INSTALLATION_ROOT/spack ]
then
git clone --depth 1 -c advice.detachedHead=false -c feature.manyFiles=true --branch $SPACK_VERSION https://github.com/spack/spack $INSTALLATION_ROOT/spack
......@@ -24,6 +25,7 @@ fi
# SPACK PATCH: see https://github.com/spack/spack/pull/35290
sed -i 's/solver.solve(abstract_specs)/solver.solve(abstract_specs, tests=kwargs.get("tests", False))/g' $INSTALLATION_ROOT/spack/lib/spack/spack/concretize.py
# copy package settings (modify if necessary) and activate Spack
cp $EBRAINS_REPO/packages.yaml $INSTALLATION_ROOT/spack/etc/spack/packages.yaml
source $INSTALLATION_ROOT/spack/share/spack/setup-env.sh
......@@ -46,7 +48,7 @@ then
spack env create $EBRAINS_SPACK_ENV
fi
# activate environment
# update and activate environment
cp $EBRAINS_REPO/spack.yaml $SPACK_ROOT/var/spack/environments/$EBRAINS_SPACK_ENV/spack.yaml
spack env activate $EBRAINS_SPACK_ENV
# There is a known spack bug (https://github.com/spack/spack/issues/29447) in installing test dependencies
......
#!/bin/bash
#title :load_sim_tools.sh
#description :Script to load simulation software on the Collaboratory Lab containers from the Object Storage at CSCS.
#author :Athanasios Karmas
#date :20210601
#usage :source ./load_sim_tools.sh
#==============================================================================
echo "Setting up environment..."
INSTALLATION_ROOT="test-build"
SPACKIFIED_ENV="ebrains-spack-builds"
cp -r /srv/$INSTALLATION_ROOT/spack/.spack ~
source /srv/$INSTALLATION_ROOT/spack/share/spack/setup-env.sh
cd /srv/$INSTALLATION_ROOT
spack repo add ebrains-spack-builds
spack env activate $SPACKIFIED_ENV
module use /srv/$INSTALLATION_ROOT/spack/share/spack/modules/linux-centos7-x86_64/
source /srv/$INSTALLATION_ROOT/spack/var/spack/environments/$SPACKIFIED_ENV/loads
echo "Everything ready!"
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