brian-team / brian

Brian is a simulator for spiking neural networks available on almost all platforms. This is the legacy version that is no longer developed, for new projects consider using Brian2 instead.
http://briansimulator.org
Other
60 stars 22 forks source link

Brian 1 depends on Python 2.x, so running it on modern systems has become more difficult. For convenience, we provide a Docker image that you can use to run existing Brian 1 code. It is based on a Debian image, and provides Brian 1.4.3, as packaged by the NeuroDebian team (https://neuro.debian.net/). To use these images, you either need to have docker (https://docker.com), podman (https://podman.io/) or singularity (https://sylabs.io/singularity/) installed – the commands below are shown for the docker command, but you can simply replace them by podman if necessary. For singularity, the basic workflow is similar but the commands are slightly different, please see the documentation. To pull the container image with singularity, refer to docker://briansimulator/brian1.4.3.

Running a graphical interface within the docker container can be complicated, and the details how to make it work depend on the host operating system. We therefore recommend to instead either 1) only use the container image to generate and save the simulation results to disk, and then to create the plots on the host system, or 2) to use the container image to plot files to disk by adding plt.savefig(...) to the script. The container already sets the matplotlib backend to Agg by default (by setting the environment variable MPLBACKEND), necessary to avoid errors when no graphical interface is available.

To download the image and to rename it to brian1 (for convenience only, the commands below would also work directly with the full name), use:

docker pull docker.io/briansimulator/brian1.4.3
docker tag briansimulator/brian1.4.3 brian1

The following command runs myscript.py with the container image providing Brian 1 and its dependencies, mapping the current directory to the working directory in the container (this means, the script has access to all files in the current directory and its subdirectories, and can also write files there):

docker run -v "$(pwd):/workdir" brian1 python myscript.py

For Windows users using the Command Prompt (cmd.exe) instead of the Powershell, the following command will do the same thing:

docker run -v %cd%:/workdir brian1 python myscript.py

To run an interactive ipython prompt, use:

docker run -it -v "$(pwd):/workdir" brian1 ipython

Depending on your operating system, files written by the container might be owned by the user "root", which can lead to problems later (e.g. you cannot rename/move/delete/overwrite the file on your home system without administrator rights). On Unix-based systems, you can prevent this issue by running scripts with the same user id as the host user:

docker run -u $(id -u):$(id -g) -v "$(pwd):/workdir" brian1 python myscript.py

Please report any issues to the Brian discussion forum: https://brian.discourse.group

Original README file for Brian 1 follows :

============ B R I A N ============================= A clock-driven simulator for spiking neural networks

Version: 1.4.4 Authors: Romain Brette http://romainbrette.fr Dan Goodman http://neural-reckoning.org Team: Cyrille Rossant http://cyrille.rossant.net/ Bertrand Fontaine Victor Benichoux Marcel Stimberg Jonathan Laudanski

==== Installation ==========================================================

Requirements: Python (version 2.5-7), the following modules:

All operating systems: run 'python setup.py install' from the download folder.

Windows: You can run the installer exe file.

==== Extras ================================================================

Included in the extras download are:

docs Documentation for Brian including tutorials.

examples Examples of using Brian, these serve as supplementary documentation.

tutorials Fully worked through tutorials on using Brian. These can be read through in the documentation too.

==== Usage and Documentation ===============================================

See the documentation in the extras download, or online:

http://www.briansimulator.org/docs

==== Changes ===============================================================

Version 1.4.3 to 1.4.4

A minor bugfix release to fix incompatibilities with recent numpy versions (>= 1.13), and to prepare for the removal of deprecated sympy features. Also fixes a potential matplotlib issue with realtime plotting (contributed by Pedro Machado)

Version 1.4.2 to 1.4.3

A minor bugfix release to fix incompatibilities with the upcoming numpy release. Also prepares for the removal of the scipy.weave package (replaced by the weave package).

Version 1.4.1 to 1.4.2

This is a bugfix release that does not add any major features. See the commit log at http://neuralensemble.org/trac/brian/log/ for details. Note that our development efforts are now entirely focused on Brian 2 (https://github.com/brian-team/brian2), this will most likely be the last release in the 1.x series.

Version 1.4.0 to 1.4.1

Major features:

Minor features:

Improvements:

Bug fixes:

Experimental features:

Version 1.3.1 to 1.4.0

Major features:

Minor features:

Improvements:

Bug fixes:

Deprecated or removed features:

Experimental features:

Version 1.3.0 to 1.3.1

Minor features:

Improvements:

Bug fixes:

Version 1.2.1 to 1.3.0

Major features:

Minor features:

Improvements:

Bug fixes:

Internal changes:

Version 1.2.0 to 1.2.1

Major features:

Minor features:

Improvements

Bug fixes

Removed features

Version 1.1.3 to 1.2.0

Major features:

Minor features:

Improvements:

Bug fixes:

New examples:

Version 1.1.2 to 1.1.3

Version 1.1.1 to 1.1.2

Version 1.1.0 to 1.1.1

Version 1.0.0 to 1.1.0

Version 1.0.0 RC5 to version 1.0.0

Version 1.0.0 RC4 to version 1.0.0 RC5

Version 1.0.0 RC3 to version 1.0.0 RC4

Version 1.0.0 RC2 to version 1.0.0 RC3

Version 1.0.0 RC1 to version 1.0.0 RC2

Version 1.0.0 beta to version 1.0.0 RC1