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.
For Optinist tutorial docker image installation, please follow the instructions in
https://github.com/oist/OCNC_tutorial_optinist/
For NEST tutorial, clone the following repository inside your docker system
git clone https://github.com/sunzhe839/ocnc2024NEST
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/.For Mac/Linux machine with x86 cpu:
docker pull cnsoist/ocnc:2024 docker run -p 6080:80 --rm -v `pwd`:/work cnsoist/ocnc:2024
For Mac machine with Apple Silicon cpu:
docker pull cnsoist/ocnc:2024_apple_silicon docker run -p 6080:80 --rm -v `pwd`:/work cnsoist/ocnc:2024_apple_silicon
for Windows, you may need to specify the path of your directory, e.g.
docker run -p 6080:80 --rm -v C:\Users\YOUR_USER_NAME\ocnc_tutorial:/work cnsoist/ocnc:2024
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
Go into the directory, and start Jupyter notebook
cd ocnc jupyter notebook --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]. -
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
- Starting Jupyter notebook
jupyter notebook --allow-root
- Starting Jupyterlab
jupyter lab --allow-root
- Python3
and with in Python
python
- NEURON https://neuron.yale.edu/neuron/
import neuron
- NEST https://nest-simulator.readthedocs.io/
import nest
- STEPS http://steps.sourceforge.net/
import steps
- Brian2 https://brian2.readthedocs.io/en/stable/
import brian2
- pystan https://pystan.readthedocs.io/en/latest/
import stan
- 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:2024
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.