This is the stuff that runs neurosynth.org.
The easiest way to get a dev environment up and running is using Docker. Instructions:
Install docker-compose with pip:
pip install docker-compose
Clone this repository somewhere convenient:
Optional: You can edit default app settings if you'd like to change the behavior of Neurosynth or store data/images in non-standard locations. By default, the settings template in
nsweb/initializers/settings_template.pywill be copied to
nsweb/initializers/settings.pythe first time you start up the service. The default settings should run fine, but if for some reason you want to change settings, you can either (a) edit the
settings_template.pyfile directly (not recommended), or (b) manually copy
settings.pyand edit the latter. Some settings you may want to edit:
- By default,
PROTOTYPE = True, which limits the database generation process to a small subset of available terms and studies. This will preserve all of the website's functionality for development purposes, without taking several hours to generate images. If you'd rather work with the full dataset, set
PROTOTYPE = False.
Optional: You can edit the docker-compose.yml file in the repository root to point to a folder on your host system where you want all data files generated by the Neurosynth server code to live. By default, all data will be generated in nsweb/data/. If you'd rather have the data live somewhere else, change the
data:/data:rwline under "volumes" inside the "neurosynth" service. For example, if you want files written to /opt/data on your host machine, replace the above line with
Use docker-compose to build the Docker image. This should take anywhere between ten minutes and a couple of hours, depending on the speed of your connection and machine, plus local availability of intermediate images. From the root of the cloned neurosynth-web repository, politely ask docker-compose to set everything up and run in the background:
docker-compose up -d
That's it! You should now be able to point your browser to
http://localhost and view a local version of Neurosynth.org. Be aware that some functionality will be crippled, as some of the data served by the production Neurosynth website are too large to include in this distribution (e.g., there are 300 GB of functional connectivity maps, so we only include maps for a few coordinates as fixtures in this repository).
Note that it can take a while (on a modern machine, perhaps 10 - 30 minutes) to fully create the Neurosynth database and various support files the first time you run
docker-compose up. So if you get errors in your browser, you may need to wait a while (you can keep retrying).