Skip to content

Docker installation

Matteo Cantarelli edited this page Jul 11, 2018 · 8 revisions

Index

Install NetPyNE UI

If you don't have docker installed see Install Docker first. To install locally the docker container of NetPyNE UI you can either use the Kitematic GUI or work directly from the command line.

Install NetPyNE UI using Kitematic

Install the right version of Kitematic for your OS from here.

Open Kitematic: search for netpyne-ui and create the container.

Image

Start the container and click on Web preview to launch it. No need to ever use the command line, enjoy!

Kitematic

Install NetPyNE UI using Docker from command line

To pull the docker container:

docker pull metacell/netpyne-ui

To run the docker container you have two options. Either

docker run -it -p 8888:8888 metacell/netpyne-ui

if you don't want to use a local folder for your NetPyNE workspace (you will only be able to access it SSHing into the docker container). Alternatively, if you want a local folder outside of the Docker container to host the NetPyNE-UI workspace (where you can import models from, export models to, inspect the log file) you can run:

docker run -it -v ~/folder_in_your_computer:/home/jovyan/netpyne_workspace -p 8888:8888 metacell/netpyne-ui

This will mount your local folder folder_in_your_computer as a volume inside the container and will be used to host the NetPyNE-UI workspace. If you want you can get NetPyNE workspace with some examples available for you running the following

git clone https://github.com/Neurosim-lab/netpyne_workspace

and pass that folder to the docker run script (folder_in_your_computer placeholder) above.

Once you run your container you can open your browser and connect to http://localhost:8888/geppetto.

One note for Windows users - once the docker image has been pulled and the NetPyNE-UI container created, you can reach your instance of NetPyNE-UI by default at the address 192#

windows_docker2

Install Docker

In order to Install NetPyNE-UI with docker we need to install docker itself before you can proceed. If you have docker already installed in your system you can skip this section. Below you can find the link with the procedure to follow depending on the OS you are using. If you have a local virtual machine [this link](https://docs.docker.com/machine/get-#

For Windows users

To install docker on Windows download docker-toolbox from the link below and follow the onscreen instructions. Windows

Few notes regarding the windows installation:

  • During the step "Select Additional Tasks", select all the checkboxes as the image here. windows_docker1.

For Linux users

To install docker on Linux follow the link below with the instructions. Linux

Few notes about the linux installation:

  • Once the installation has been completed, to run docker from your user you need to add it to the docker group. To do this you can run the command below
sudo usermod -a -G docker $USERNAME

Once the command has been executed you need to open a new terminal or login in your environment again in order to make the change effective.

For MacOS users

To install docker on Mac OS follow the link below with the instructions. MacOS

Troubleshooting

Problem: port is already allocated

This problem happens when a instance of docker is already running and allocated already that port (e.g. 8888).

$ docker run -t -v ~/Documentz/neuro/NetPyNe_tutrial/:/home/jovyan/netpyne_workspace -p 8888:8888 metacell/netpyne-ui

C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: driver failed programming external connectivity on endpoint determined_goodall (3cab012238d52f801b88cf745c3ad930043273220c1c76dafc84170a64c0eb02): Bind for 0.0.0.0:8888 failed: port is already allocated.

Solution 1:

Simplest solution, open the browser and go to the address http://localhost:8888/geppetto , you should see NetPyNe-UI loading if all the rest is fine.

Solution 2:

In case NetPyNe-UI did not load you can try the following commands:

$ sudo fuser -v -n tcp 8888
                     USER PID ACCESS COMMAND
8888/tcp:            root      28614 F.... docker-proxy

The command fuser shows us that there is already a process running with the port 8888 allocated. We can now check which container is running with:

$ docker ps -a
CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS                      PORTS                    NAMES
94bc4cce6f96        metacell/netpyne-ui   "tini -- /bin/sh -c …"   39 seconds ago      Created                                              gifted_leavitt
d5434eb6b562        metacell/netpyne-ui   "tini -- /bin/sh -c …"   50 seconds ago      Up 48 seconds               0.0.0.0:8888->8888/tcp   stoic_visvesvaraya
5d59a7fc87e4        metacell/netpyne-ui   "tini -- /bin/sh -c …"   7 weeks ago         Exited (130) 7 weeks ago                             quirky_einstein
fd2f7190d884        metacell/netpyne-ui   "tini -- /bin/sh -c …"   7 weeks ago         Exited (130) 7 weeks ago                             confident_ritchie
33cface44b04        metacell/netpyne-ui   "tini -- /bin/sh -c …"   7 weeks ago         Exited (130) 7 weeks ago                             upbeat_northcutt
61b59d9af70c        metacell/netpyne-ui   "tini -- /bin/sh -c …"   7 weeks ago         Exited (130) 7 weeks ago                             vibrant_kirch
21e0c0ce9f9b        metacell/netpyne-ui   "tini -- /bin/sh -c …"   8 weeks ago         Exited (130) 8 weeks ago                             distracted_goldwasser
f77023c62065        metacell/netpyne-ui   "tini -- /bin/sh -c …"   8 weeks ago         Exited (130) 8 weeks ago                             admiring_keldysh
eec4f03e06d3        metacell/netpyne-ui   "tini -- /bin/sh -c …"   8 weeks ago         Exited (130) 8 weeks ago                             musing_austin
7699e05f0e92        metacell/netpyne-ui   "tini -- /bin/sh -c …"   2 months ago        Exited (255) 2 months ago   0.0.0.0:8888->8888/tcp   silly_beaver
209f47beb54f        hello-world           "/hello"                 2 months ago        Exited (0) 2 months ago                              infallible_colden

We can see that the container called stoic_visvesvaraya is up since 48 seconds, at this point we can decide as per Solution 1 to go directly to our browser and open the url pointed there or either we can stop the container with

docker stop stoic_visvesvaraya

and then run again the command to run our docker container.

Solution 3:

If the previous 2 solutions did not work you can run the command below, that will allocate a different port, in this case 8889.

docker run -it -p 8888:8889 metacell/netpyne-ui

Problem: This computer doesn't have VT-x/AMD-v enabled.

This problem happens exclusively on windows and it is related to the Hyper-V feature not enabled in the BIOS machine and probably as well on windows itself. An exhaustive explanation of how to fix the problem is reported by Microsoft at this link. If the tutorial is too long or even after following all the steps docker does not work you might want to switch to our Virtual Image solution using VirtualBox, refer to this link for the installation.

Problem: Image operating system linux cannot be used on this platform

This problem happens exclusively on windows and it is related to the fact that docker for Windows allows switching between Linux and native Windows container. For an exhaustive explanation of how to deal with this problem please refer to this link.

If you are familiar with the terminal you can deal with this problem running the commands below.

docker run --rm --platform linux -it -p 8888:8888 metacell/netpyne-ui
docker run --platform linux

After you ran these commands you can try to start the NetPyNe-UI container again. If the tutorial is too long or even after following all the steps docker does not work you might want to switch to our Virtual Image solution using VirtualBox, refer to this link for the installation.

Problem: Error response from daemon: Get https://registry-1.docker.io/v2/

This problem is related to restictions on the network you are using or either by the usage of the Windows firewall. First disable your windows firewall, if that does not help talk with your network administrator.

You can’t perform that action at this time.