Skip to content

A cleaned version of neuroephys_v2 that removed the binary dependencies and replaced them by a cmakelists.txt

Notifications You must be signed in to change notification settings

DSPsleeporg/neuronephys_clean

 
 

Repository files navigation

neuronephys_clean

A cleaned version of neuroephys_v2 that removed the binary dependencies and replaced them by a cmakelists.txt. The repository is also integrated with Dockerfile that enables single-line configuration.

This repository uses git LFS to handle the large binary files. Install it before cloning the repository.

Given that free github account has a file size limit of 2GB and I do not plan to pay, please download the whole brain connectivity from Google Drive following this and this link.

Installation guide

The suggested installation method is to build using docker. To install docker on your computer, refer to get docker. Additionally, a supported NVIDIA GPU, a sufficiently recent driver (>= v440.82 for Linux, >= v471.41 for Windows has been verified to work.)

For Linux-based machines, NVIDIA container toolkit is needed.

For Windows-based machines, WSL2 backend for docker is used. Either Windows 10 Insider preview version or Windows 11 is needed. Refer to this page and this page about the setup for CUDA on WSL2.

When docker is correctly installed, the image can be built by

docker build -t <tag_name> . in the root directory. (Replace <tag_name> with a name of the image of your choice without the brackets. The process is slow (more than 30 minutes), as Arrayfire is huge, and is built from source.)

To build the whole-brain simulation version, build by specifying the alternate Dockerfile:

docker build -f Dockerfile.wholebrain -t <tag_name> .

Run guide

With the configuration complete, run

docker run -v /dev/shm:/dev/shm -p 6080:80 --gpus all -m 8192m <tag_name>

Note: -m 8192m allows the container to use up to 8G of memory, and is verified to be sufficient for the example. It may be possible to tighten this bound. For the whole-brain simulation, allocate at least 16G of memory.

Then visit 127.0.0.1:6080 using a modern web browser.

Open LXTerminal:

LXTerminal_position

Run cd /src/neuronephys, then ./neuronephys:

sample_screenshot

If everything goes smoothly, a program similar to above should show up.

Alternative setup on local computer

The program can be built with CMake. While Dockerfile contains the details, here is an overview of the caveats:

  1. ANN_ROOT and GLM_ROOT need to be passed as an argument to CMake, as ```findANN``` and ```findGLM``` are some very ad-hoc findpackage files that are only tested to work here.
  2. build ANN using what is included here! There are slight modifications from the most common version online, notebly using float instead of double.
  3. On Windows machines, use CMake to generate a Visual Studio project. Then, replace ```GL.lib``` with ```OpenGL32.lib``` in ```Linker->Input->Additional Dependencies```, and copy all the dll files with corresponding name to the directory containing the generated project file.
  4. You take the responsibility for the compatibility! The docker uses CUDA 11.1. It also works with CUDA 11.4.

About

A cleaned version of neuroephys_v2 that removed the binary dependencies and replaced them by a cmakelists.txt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 48.6%
  • JavaScript 27.4%
  • Cuda 8.0%
  • Python 6.2%
  • HTML 3.0%
  • C 2.3%
  • Other 4.5%