From 91c287f8527095812bdb7f7bf69f75df691a25df Mon Sep 17 00:00:00 2001
From: Athanasios Karmas <karmas@athenarc.gr>
Date: Tue, 1 Jun 2021 14:28:29 +0000
Subject: [PATCH] Script to load simulation software on the Collaboratory Lab
 containers from the Object Storage at CSCS

---
 load_sim_tools.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 load_sim_tools.sh

diff --git a/load_sim_tools.sh b/load_sim_tools.sh
new file mode 100644
index 00000000..2c7df106
--- /dev/null
+++ b/load_sim_tools.sh
@@ -0,0 +1,45 @@
+#!/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 "Downloading files..."
+
+wget https://object.cscs.ch/v1/AUTH_9c619ee75cab4993b1c4c86a37586357/test_spack/spack_20210601.tar.gz
+wget https://object.cscs.ch/v1/AUTH_9c619ee75cab4993b1c4c86a37586357/test_spack/spack_tmp_20210601.tar.gz
+wget https://object.cscs.ch/v1/AUTH_9c619ee75cab4993b1c4c86a37586357/test_spack/shared_libs.tar.gz
+
+echo "Extracting..."
+
+tar -xzvf spack_20210601.tar.gz
+tar -xzvf spack_tmp_20210601.tar.gz
+tar -xzvf shared_libs.tar.gz
+
+rm -f spack_20210601.tar.gz
+rm -f spack_tmp_20210601.tar.gz
+rm -f shared_libs.tar.gz
+
+echo "Setting up environment..."
+
+mv spack/ /opt/app-root/src/
+mv .spack /opt/app-root/src/
+mv shared_libs /opt/app-root/src/
+cd /opt/app-root/src
+
+source spack/share/spack/setup-env.sh
+export LD_LIBRARY_PATH=/opt/app-root/src/shared_libs:$LD_LIBRARY_PATH
+
+echo "Loading packages..."
+
+spack load -r python %gcc@9.3.1
+spack load -r py-numpy %gcc@9.3.1
+spack load -r arbor %gcc@9.3.1
+spack load -r neuron %gcc@9.3.1
+spack load -r nest %gcc@9.3.1
+
+echo "Everything ready!"
+#echo "Starting Python..."
+#python
-- 
GitLab