Skip to content
Snippets Groups Projects
Commit ff6426a0 authored by Ugo Albanese's avatar Ugo Albanese
Browse files

Merged in NRRPLT-7989-spinnake-from-source (pull request #74)

[NRRPLT-7989] Update install_spinnaker.sh

Approved-by: Eloy Retamino
parent f0dc2f28
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# A script to install Spinnaker
echo "========================================================================================"
echo "Welcome to the Spinnaker 8 installation setup!"
echo "========================================================================================"
echo "This setup will create a new directory called 'spinnaker' in the HBP installation folder and download all required files to this directory."
echo "After that, the Spinnaker binaries will be build from sources so please make sure that you have a C-compiler installed and added to the path."
printf "\033[1;33mWould you like to install SpiNNaker on your machine? (Y/n)\033[0m\n"
read -t 5 p
read -rt 5 p
if [ "$p" == "Y" -o "$p" == "y" ]
then
# TODO: Instead we should modify the python dependencies for the NRP project
# Activate the platform virtual env and install the Python dependencies
source $NRP_VIRTUAL_ENV/bin/activate
pip install "appdirs>=1.4.2,<2.0.0" future "numpy>=1.12,<1.9999" "scipy>=0.16.0" "six>=1.8.0" "pylru>=1" "enum34; python_version<'3.4'" future lxml jsonschema sortedcollections
pip install "rig>=2.0.0,<3.0.0" futures enum-compat pytz tzlocal "requests>=2.4.1" matplotlib
pip install csa "quantities>=0.12.1" "pynn>=0.9.2,<0.10" "lazyarray>=0.2.9,<=0.4.0" "neo>=0.5.2,< 0.7.0"
deactivate
# NRRPLT-7989
# As of 2020-11-10 pip version of SPyNNaker8 doesn't work with PyNN 0.9.5.
# Install from pip when it will.
no_install_msg="SpiNNaker support is DISABLED."
# Create a directory for the spinnaker tools
mkdir $HBP/spinnaker && cd $HBP/spinnaker || { echo ERROR; exit 1; }
git clone https://github.com/SpiNNakerManchester/SupportScripts.git || { echo ERROR; exit 1; }
mkdir -p "$HBP"/spinnaker || { printf '\nERROR: SpiNNaker is already installed, please remove the $HBP/spinnaker directory and retry'; exit 1; }
cd "$HBP"/spinnaker
git clone https://github.com/SpiNNakerManchester/SupportScripts.git
# Run the support script to fetch all repositories
cd $HBP/spinnaker || { echo ERROR; exit 1; }
source $NRP_VIRTUAL_ENV/bin/activate || { echo ERROR; exit 1; }
SupportScripts/install.sh PyNN8
SupportScripts/install.sh 8 -y
deactivate
# Set up the C environment variables
......@@ -39,20 +40,26 @@ then
# Build everything
cd $HBP/spinnaker
source $NRP_VIRTUAL_ENV/bin/activate
SupportScripts/setup.sh
SupportScripts/automatic_make.sh
SupportScripts/setup.sh || { printf "\nERROR: SpiNNUtils setup.sh - %s" "${no_install_msg}"; return 1; }
SupportScripts/automatic_make.sh || { printf "\nERROR: SpiNNUtils make - %s" "${no_install_msg}"; return 1; }
python -m spynnaker8.setup_pynn
python -m spynnaker8.setup_pynn || { printf "\nERROR: spynnaker8.setup_pynn - %s" "${no_install_msg}"; return 1; }
python -c "import pyNN.spiNNaker"
deactivate
echo "Spinnaker 8 was successfullly installed on your system."
echo "You can now use the Spinnaker board for experiments in the HBP Neuro­robotics Plat­form."
echo
echo "========================================================================================"
echo "Spinnaker 8 has been successfully installed on your system."
echo "You can now use the SpiNNaker board for experiments in the HBP Neurorobotics Platform."
echo
echo 'WARNING: Please, edit $HOME/.spynnaker.cfg before running your first SpiNNaker simulation'
echo "========================================================================================"
else
echo "Spinnaker was not installed on your machine."
echo
echo "=================================================="
echo "Spinnaker 8 has NOT been installed on your machine"
echo "=================================================="
fi
echo
......@@ -338,18 +338,6 @@ function nrp_build {
make devinstall || { echo $i BUILD ERROR; exit 1; }
done
# sPynnaker8 requires enum34, which is problematic in python > 3.4
# TODO remove as soon as sPyNNaker8 is updated
# if [[ ($PYTHON_VERSION_MAJOR -ge 3) && ($PYTHON_VERSION_MINOR -ge 4) ]]; then
# echo
# echo ---------------------------------------------------------------------
# echo "Uninstalling enum34 (requirement of sPyNNaker8) from NRP_VIRTUAL_ENV"
# echo ---------------------------------------------------------------------
# source ${NRP_VIRTUAL_ENV}/bin/activate
# $PIP_CMD uninstall -y enum34
# deactivate
# fi
for i in brainvisualizer ExDFrontend nrpBackendProxy
do
echo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment