Skip to content
Snippets Groups Projects
Athanasios Karmas's avatar
Athanasios Karmas authored
780a4b45
Name Last commit Last update
.gitlab-ci.yml
README.md
load_sim_tools.sh

ebrains-spack-builds

Build and distribute software with Spack

Quickstart

  • Open a terminal at a running Collaboratory Lab Container and execute the following:
 git clone https://gitlab.ebrains.eu/akarmas/ebrains-spack-builds.git
 cd ebrains-spack-builds
 source ./load_sim_tools.sh
  • Then you can start python and import the available tools
  • Currently installed:
    arbor
    neuron
    nest

Bulding software binaries with Spack

ToDo: The current build path needs to be automated with CI (e.g. gitlab runners)

  • As a reference you can find here the Spack commands list

  • We will need to have different Spack environments to test specs (and build packages) and when tests are passing release specs from testing environments to production environment

  • First of all we need to create an appropriate build environment (at a dedicated VM or container image or gitlab runner). The build environment must run on the same OS as the Collaboratory base container image and fulfill all Spack's pre-requisites ( 1, 2 )

  • The Spack installation folder at build time must (currently) be:

/opt/app-root/src

to match the Spack installation directory on the current Collab base container image

  • At the build environment a recent version of gcc must be running. Install the most appropriate gcc version based on the OS of the build environment. Below you can find the instructions to install the appropriate gcc version for CentOS 7 (current OS of Collaboratory base image). Instructions to install "devtoolset-9" here.
  • Then we can start building and installing tools with Spack:
spack install arbor %gcc@9.3.1
spack install neuron %gcc@9.3.1
spack install nest %gcc@9.3.1 +python

and perform tests for the installations:

https://docs.arbor-sim.org/en/stable/tutorial/single_cell_model.html
https://neuron.yale.edu/neuron/static/docs/neuronpython/firststeps.html
https://nest-simulator.readthedocs.io/en/nest-2.20.1/auto_examples/one_neuron.html

  • (Potentially) fix any potential errors for shared libraries (info 1, 2, 3)

Delivery of the software binaries

ToDo:This methodology will change, and the delivery will be be implemented via Gitlab CI and use of the shared NFS drive

  • After build is complete, we move on to zip the "$SPACK_ROOT" and the ~/.spack folders of the build environment and transfer them to CSCS Object Storage (currently, in the future it will be a shared NFS drive)
  • The artifacts that were built can now be used from the Collaboratory running containers to load and run the available simulation tools

Activating software in the Collaboratory Lab containers

  • Currently to load the pre-built simulation tools in the Collaboratory Lab containers refer to Quickstart at the beggining of this file (currently the Object Storage at CSCS is used to download the pre-built software as a stop-gap measure until a shared NFS drive is available).
  • This process will change in the future as all simulation tools will be available in the Collaboratory running containers from a shared NFS drive