{"id":13645271,"url":"https://github.com/genn-team/genn","last_synced_at":"2026-01-20T19:08:45.745Z","repository":{"id":21317338,"uuid":"24633934","full_name":"genn-team/genn","owner":"genn-team","description":"GeNN is a GPU-enhanced Neuronal Network simulation environment based on code generation for Nvidia CUDA and AMD HIP.","archived":false,"fork":false,"pushed_at":"2026-01-12T12:31:23.000Z","size":258712,"stargazers_count":270,"open_issues_count":43,"forks_count":77,"subscribers_count":17,"default_branch":"master","last_synced_at":"2026-01-12T18:38:47.480Z","etag":null,"topics":["computational-neuroscience","hacktoberfest","nvidia-cuda","simulation","spiking-neural-networks"],"latest_commit_sha":null,"homepage":"http://genn-team.github.io/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/genn-team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-09-30T10:22:50.000Z","updated_at":"2026-01-12T12:31:24.000Z","dependencies_parsed_at":"2023-02-17T21:01:08.565Z","dependency_job_id":"57e0b5c5-7e03-46e2-af80-9498bfdd6c7f","html_url":"https://github.com/genn-team/genn","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/genn-team/genn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genn-team%2Fgenn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genn-team%2Fgenn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genn-team%2Fgenn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genn-team%2Fgenn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/genn-team","download_url":"https://codeload.github.com/genn-team/genn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genn-team%2Fgenn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28609764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computational-neuroscience","hacktoberfest","nvidia-cuda","simulation","spiking-neural-networks"],"created_at":"2024-08-02T01:02:32.662Z","updated_at":"2026-01-20T19:08:45.695Z","avatar_url":"https://github.com/genn-team.png","language":"C++","funding_links":[],"categories":["C++","Spiking and Neuromorphic Frameworks"],"sub_categories":[],"readme":"\n[![Build Status](https://gen-ci.inf.sussex.ac.uk/buildStatus/icon?job=GeNN%2Fgenn%2Fmaster)](https://gen-ci.inf.sussex.ac.uk/job/GeNN/job/genn/job/master/)[![codecov.io](https://codecov.io/github/genn-team/genn/coverage.svg?branch=master)](https://codecov.io/github/genn-team/genn?branch=master) [![DOI](https://zenodo.org/badge/24633934.svg)](https://zenodo.org/badge/latestdoi/24633934)\n[![Dockerhub](https://img.shields.io/badge/dockerhub-images-orange.svg?logo=docker)](https://hub.docker.com/repository/docker/gennteam/genn) [![Neuromorphic Computing](https://img.shields.io/badge/Collaboration_Network-Open_Neuromorphic-blue)](https://open-neuromorphic.org/neuromorphic-computing/)\n\n# GPU-enhanced Neuronal Networks (GeNN)\n\nGeNN is a GPU-enhanced Neuronal Network simulation environment based on code generation for NVIDIA CUDA and AMD HIP.\n\n## Installation\n\n### Pre-installation\n\n1.  Install the C++ compiler on the machine, if not already present.\n    For Windows, Visual Studio 2019 or above is required. The Microsoft Visual Studio \n    Community Edition can be downloaded from\n    https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx.\n    When installing Visual Studio, one should select the 'Desktop \n    development with C++' configuration. On Linux, the GNU Compiler \n    Collection (GCC) 7.5 or above is required. This can be obtained from your\n    Linux distribution repository, for example on Ubuntu by running ``sudo apt-get install g++``, \n    or alternatively from https://gcc.gnu.org/index.html.\n2.  If your machine has an NVIDIA GPU and you haven't installed CUDA already, \n    obtain a fresh installation of the NVIDIA CUDA toolkit from\n    https://developer.nvidia.com/cuda-downloads\n    Be sure to pick CUDA and C++ compiler versions which are compatible\n    with each other. The latest C++ compiler need not necessarily be\n    compatible with the latest CUDA toolkit. Similarly, if your machine \n    has an AMD GPU and you haven't installed HIP yet, follow the instructions at\n    https://rocm.docs.amd.com/projects/HIP/en/latest/install/install.html.\n3.  GeNN uses the ``CUDA_PATH`` environment variable to determine which \n    version of CUDA to build against. On Windows, this is set automatically when \n    installing CUDA. However, if you choose, you can verify which version is \n    selected by running ``echo %CUDA_PATH%`` in a command prompt.\n    However, on Linux, you need to set ``CUDA_PATH`` manually with:\n    ``export CUDA_PATH=/usr/local/cuda``\n    assuming CUDA is installed in /usr/local/cuda (the standard location \n    on Ubuntu Linux). Similarly, if you are using HIP, you need to set the \n    ``HIP_PATH`` variable manually and also specify your platform with either\n    ``export HIP_PLATFORM='nvidia'`` if you wish to use HIP with an NVIDIA GPU\n    or ``export HIP_PLATFORM='amd'`` if you wish to use an AMD GPU.\n    To make any of these changes persistent, these commands should be added to your login \n    script (e.g. ``.profile`` or ``.bashrc``).\n4.  On Linux, install the development version of libffi. For example, on Ubuntu you can do this\n    by running ``sudo apt-get install libffi-dev``.\n\n### Installation using pip\nThe easiest way to install GeNN is directly from github using pip. \nFirst of all make sure pip is up to date using :\n``pip install -U pip``\nThen, to install the latest development version you can use:\n``pip install https://github.com/genn-team/genn/archive/refs/heads/master.zip`` or, to install the 5.3.0 release, you can use: \n``pip install https://github.com/genn-team/genn/archive/refs/tags/5.3.0.zip``.\n\n### Creating an editable install with pip\nIf you want to develop GeNN yourself or run userprojects from the GeNN repository, it is helpful to create an 'editable' install. \nThe easiest way to do this to first 'clone' GeNN from github using ``git clone https://github.com/genn-team/genn.git``.\nThen, navigate to the GeNN directory and install using ``pip install -e .``. If you wish to install the additional dependencies needed \nto run the userprojects, you can do so using ``pip install -e .[userproject]``.\n\n### Building with setup.py (LEGACY)\nAlthough it is not recommended, in order to build special development versions you sometimes need to install the old fashioned way!\n1.  Manually install PyGeNN's build dependencies using pip i.e. ``pip install pybind11 psutil pkgconfig setuptools\u003e=61``.\n2.  Clone GeNN using git i.e. using ``git clone https://github.com/genn-team/genn.git``\n3.  From the GeNN directory, build PyGeNN using ``python setup.py develop``. \n    You can build a debug version of GeNN with ``python setup.py build_ext --debug develop``.\n\n## Docker\nYou can also use GeNN through our CUDA-enabled docker container which comes with GeNN pre-installed.\nTo work with such CUDA-enabled containers, you need to first install CUDA on your host system as described above and then install docker and the NVIDIA Container Toolkit as described in https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker.\nYou can then build the GeNN container yourself or download it from Dockerhub.\n\n### Building the container\nThe following command can be used from the GeNN source directory to build the GeNN container:\n```bash\nmake docker-build\n```\n\nThis builds a container tagged as ``genn:latest`` so, to use this container rather than downloading the prebuild one from dockerhub, just replace ``gennteam/genn:latest`` with ``genn:latest`` in the following instructions.\nBy default, the container image is based off the Ubuntu 20.04 image with CUDA 11.5 provided by NVIDIA but, if you want to use a different base image, for example to use the container on a machine with an older version of CUDA, you can invoke ``docker build`` directly and specify a different tag (listed on https://gitlab.com/nvidia/container-images/cuda/blob/master/doc/supported-tags.md)  via the ``BASE`` build argument. For example to build using CUDA 11.3 you could run:\n```bash\ndocker build  --build-arg BASE=11.3.0-devel-ubuntu20.04 -t genn:latest_cuda_11_3 .\n```\n\n### Interactive mode\nIf you wish to use GeNN or PyGeNN interactively, you can launch a bash shell in the GeNN container using the following command:\n```bash\ndocker run -it --gpus=all gennteam/genn:latest\n```\nYou can also provide a final argument to launch a different executable e.g. ``/bin/sh`` to launch a dash shell.\n**NOTE** PyGeNN is installed in the system Python 3 environment, the interpreter for which is launched with ``python3`` (rather than just ``python``) on Ubuntu 20.04.\n\n### Accessing your files\nWhen using the GeNN container you often want to access files on your host system.\nThis can be easily achieved by using the ``-v`` option to mount a local directory into the container. For example:\n```bash\ndocker run -it --gpus=all -v $HOME:/local_home gennteam/genn:latest\n```\nmounts the local user's home directory into ``/local_home`` within the container.\nHowever, all of the commands provided by the GeNN container operate using a non-elevated, internal user called 'genn' who, by default, won't have the correct permissions to create files in volumes mounted into the container.\nThis can be resolved by setting the ``LOCAL_USER_ID`` and ``LOCAL_GROUP_ID`` environment variables when running the container like:\n```bash\ndocker run -it --gpus=all -e LOCAL_USER_ID=`id -u $USER` -e LOCAL_GROUP_ID=`id -g $USER` -v $HOME:/local_home gennteam/genn:latest\n```\nwhich will ensure that that 'genn' user has the same UID and GID as the local user, meaning that they will have the same permissions to access the files mounted into ``/local_home``. \n\n### Running Jupyter Notebooks\nA Jupyter Notebook environment running in the container can be launched using the ``notebook`` command. Typically, you would combine this with the ``-p 8080:8080`` option to 'publish' port 8080, allowing the notebook server to be accessed on the host. By default, notebooks are created in the home directory of the 'genn' user inside the container. However, to create notebooks which persist beyond the lifetime of the container, the notebook command needs to be combined with the options discussed previously. For example:\n```bash\ndocker run --gpus=all -p 8080:8080 -e LOCAL_USER_ID=`id -u $USER` -e LOCAL_GROUP_ID=`id -g $USER` -v $HOME:/local_home gennteam/genn:latest notebook /local_home\n```\nwill create notebooks in the current users home directory.\n\n### Running PyGeNN scripts\nAssuming they have no additional dependencies, PyGeNN scripts can be run directly using the container with the ``script`` command. As scripts are likely to be located outside of the container, the script command is often combined with the options discussed previously. For example, to run a script called ``test.py`` in your home directory, the script command could be invoked with:\n```bash\ndocker run --gpus=all -e LOCAL_USER_ID=`id -u $USER` -e LOCAL_GROUP_ID=`id -g $USER` -v $HOME:/local_home gennteam/genn:latest script /local_home/test.py\n```\n\n## Usage\n\n### Sample projects\n\nAt the moment, the following Python example projects are provided with GeNN:\n\n- Cortical microcircuit model \\([Potjans et al. 2014][@Potjans2014]\\)\n- SuperSpike model \\([Zenke et al. 2018][@Zenke2018]\\)\n- MNIST classifier using an insect-inspired mushroom body model\n\nIn order to get a quick start and run one of the the provided example models, navigate to the userproject directory, and run the python script with ``--help`` to see what options are available.\n\nFor more details on how to use GeNN, please see [documentation](http://genn-team.github.io/genn/).\n\n[@Potjans2014]: https://doi.org/10.1093/cercor/bhs358 \"Potjans, T. C., \u0026 Diesmann, M. The Cell-Type Specific Cortical Microcircuit: Relating Structure and Activity in a Full-Scale Spiking Network Model. Cerebral Cortex, 24(3), 785–806 (2014)\"\n[@Zenke2018]: https://doi.org/10.1162/neco_a_01086  \"Zenke, F., \u0026 Ganguli, S. (2018). SuperSpike: Supervised Learning in Multilayer Spiking Neural Networks. Neural Computation, 30(6), 1514–1541.\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenn-team%2Fgenn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenn-team%2Fgenn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenn-team%2Fgenn/lists"}