This repository provides Docker image with pre-compiled computational neuroscience software and usage instructions for the OIST Computational Neuroscience Course (OCNC). For more information of the course, please visit https://groups.oist.jp/ocnc.
Download and install Docker Desktop https://www.docker.com/products/docker-desktop/. For Mac users, please note that Docker provides different installers for Intel and Apple silicon cpu.
-
start the Docker Desktop application.
-
Open a Terminal/Command prompt/PowerShell.
-
In the Terminal, prepare a directory for storing your exercise files, and
cd
to this directory. e.g.:mkdir ocnc_tutorial cd ocnc_tutorial
-
In the Terminal, execute the following command to fetch and start the OCNC docker container, note that
-v `pwd`/:/work
mount your current directory (in the above case,ocnc_tutorial
) as/work
in your Docker container system, and--rm
set the container to be destroyed automatically after use (i.e. any change to the docker system will not be saved except the files stored in/work
). For more information about the Docker commands, please visit https://docs.docker.com/engine/reference/commandline/run/.docker pull cnsoist/ocnc:2023 docker run -p 6080:80 --rm -v `pwd`:/work cnsoist/ocnc:2023
for Windows, you may need to specify the path of your directory, e.g.
docker run -p 6080:80 --rm -v C:\Users\ocnc2023\ocnc_tutorial:/work cnsoist/ocnc:2023
You should see similar information as below from the Terminal.
-
Open a web browser and enter: http://127.0.0.1:6080/. The following interface should be shown in the browser.
-
Double click the
LXTerminal
icon to open a terminal in the docker system. You can also double click theocnc
icon to access this repository page for future references. -
In the
LXTerminal
,cd
to\work
.cd /work
You can store and exchange files between your host system and the docker system here.
Then clone the ocnc github repository.
git clone https://github.com/CNS-OIST/ocnc.git
We want to use jupyter notebook to test our software packages, but first we need to setup the jupyter server password using
jupyter notebook password
you can enter whatever password you like, just need to remember it as jupyter will ask you for it later. Now go into the directory, and start Jupyter notebook
cd ocnc jupyter notebook --ip=0.0.0.0 --allow-root
A Jupyter notebook interface should pop up, within it, open the
simulator_tests.ipynb
, and from the top menu selectCell
->Run All
. Jupyter may ask for the password you've just set from time to time. Please check the default behaviors of this test from the video below, if yours behave differently, please contact [email protected].OCNC Docker image test demostration (Youtube) -
At the tutorial sessions, start the computational neuroscience software according to your tutorial instructions from the
LXTerminal
. Here are some general commands for different software.- update the ocnc github repository.
cd /work/ocnc git pull
- Copying and Pasting
- Setting Jupyter server password
jupyter notebook password
- Starting Jupyter notebook
jupyter notebook --ip=0.0.0.0 --allow-root
- Starting Jupyterlab
jupyter lab --ip=0.0.0.0 --allow-root
- Python3
and with in Python
python
- NEURON https://neuron.yale.edu/neuron/
import neuron
- NEST https://nest-simulator.readthedocs.io/en/v3.3/
import nest
- STEPShttp://steps.sourceforge.net/
import steps
- Brian2https://brian2.readthedocs.io/en/stable/
import brian2
- NEURON https://neuron.yale.edu/neuron/
- NEURON with GUI and hoc interpreter
nrngui
- update the ocnc github repository.
-
Once you finish your work, make sure your files have been saved to
/work
(akaocnc_tutorial
in your host system), then go back to the Terminal/Command prompt/PowerShell of your host system, and pressctrl + c
to stop the docker container.
If you want to connect to the docker system using a vnc viewer such as https://www.realvnc.com/en/connect/download/viewer/ instead of the browser, start the docker with
docker run -p 6080:80 -p 5900:5900 --rm -v `pwd`:/work cnsoist/ocnc:2023
Open your vnc viewer and enter 127.0.0.1:5900
as the address
a vnc connection to the docker system should then be displayed.