NEST Server

nest

NEST is a simulator for spiking neural network models that focuses on the dynamics, size and structure of neural systems rather than on the exact morphology of individual neurons. The development of NEST is coordinated by the NEST Initiative.

NEST is ideal for networks of spiking neurons of any size, for example: - Models of information processing e.g. in the visual or auditory cortex of mammals, - Models of network activity dynamics, e.g. laminar cortical networks or balanced random networks, - Models of learning and plasticity.

See also

Read the full installation guide of NEST Simulator here.

The API Server for NEST is referred to as NEST Server. We highly recommend installing NEST 3, in which the NEST server is implemented.

Note

Before you start nest-server, you are able to set these environment variables in bash:

export NEST_SERVER_DISABLE_AUTH=1
export NEST_SERVER_ENABLE_EXEC_CALL=1
export NEST_SERVER_DISABLE_RESTRICTION=1
export NEST_SERVER_MODULES="import nest;import numpy;import numpy as np"

For more information read the full documentation of NEST Server here.

Mamba (Conda)

  1. Activate the Mamba environment nest:

    mamba activate nest
    
  2. Install NEST Simulator and dependencies for the API Server:

    mamba install nest-simulator flask flask-cors gunicorn restrictedpython
    
  3. Start NEST Server as the back end:

    The API Server for NEST Simulator is referred to as NEST Server.

    nest-server start
    

NEST Server is now running at http://localhost:52425.

Set specific env variables when activating conda environment.

mamba activate nest
mamba env config vars set NEST_SERVER_DISABLE_AUTH=1
mamba env config vars set NEST_SERVER_ENABLE_EXEC_CALL=1
mamba env config vars set NEST_SERVER_DISABLE_RESTRICTION=1
mamba env config vars set NEST_SERVER_MODULES="import nest;import numpy;import numpy as np"

Python

NEST Simulator has no python package but you can install it via conda or on host system:

  1. Install the dependencies for the API Server of NEST Simulator:

    pip install flask flask-cors gunicorn restrictedpython
    
  2. Start NEST Server as the back end:

    The API Server for NEST Simulator is referred to as NEST Server.

    nest-server start
    

NEST Server is now running at http://localhost:52425.

Source install

  1. Download and unpack latest release package of NEST source code:

    export NEST_VERSION=3.8
    wget https://github.com/nest/nest-simulator/archive/refs/tags/v${NEST_VERSION}.tar.gz -P /tmp
    cd /tmp && tar -zxvf v${NEST_VERSION}.tar.gz
    
  2. Install requirements for NEST Simulator and NEST Server.

    python3 -m pip install --upgrade pip setuptools wheel
    python3 -m pip install -r /tmp/nest-simulator-${NEST_VERSION}/requirements_pynest.txt
    python3 -m pip install -r /tmp/nest-simulator-${NEST_VERSION}/requirements_nest_server.txt
    
  3. Prepare for build:

    mkdir /tmp/nest-build && cd $_
    cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME/opt/nest /tmp/nest-simulator-${NEST_VERSION}
    make -j $(nproc)
    make install
    
  4. Load NEST environment variables in Terminal:

    source opt/nest/bin/nest_vars.sh
    

    Hint

    Add this line to .bashrc

  5. Install NEST Server (in Python or Conda).