|
| 1 | + |
| 2 | +### How to run the spikeinterface container |
| 3 | +**Method 1: drag and drop** (Windows only for now) |
| 4 | +Drag and drop the data folder on either `.bat` file (see `launch_scripts` folder). For convenience, create a shortcut and put it on your desktop. |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | +_Which launch script should you pick?_ |
| 9 | + |
| 10 | + `SpikeInterface_OneOff.bat` will start a one-off sesssion. The container will self-destroy upon shutdown (not just closing the tab though). If the tab is closed, go back to your session at this address: http://localhost:8888/lab?token=mytoken. |
| 11 | + |
| 12 | + `SpikeInterface_Persist.bat` will start a persistent container that can be reused. The drawback is that data folder will stay the same until the container is stopped and remove (which can be done following instructions below). |
| 13 | +In the `.bat`, please replace "mytoken" by some other word of your choice. |
| 14 | + |
| 15 | +To add files and notebooks to your session, drag and drop them on the left side mneu. |
| 16 | +Files can be downloaded with right-click > download. |
| 17 | + |
| 18 | +**Method 2: manual start** |
| 19 | +1. Open a terminal and navigate to the data directory. Then follow these instructions. |
| 20 | +2. Start the container |
| 21 | +*On Linux/MacOS* |
| 22 | +`export JUPYTER_TOKEN='mytoken'` |
| 23 | +`docker run -d --rm --name spikeinterface -v "${PWD}":/home/jovyan/data -p 8888:8888 -e JUPYTER_TOKEN spikeinterface/spikeinterface:0.2` |
| 24 | +*On Windows* |
| 25 | +`set JUPYTER_TOKEN=mytoken` |
| 26 | +`docker run -d --rm --name spikeinterface -v "%CD%":/home/jovyan/data -p 8888:8888 -e JUPYTER_TOKEN spikeinterface/spikeinterface:0.2` |
| 27 | + |
| 28 | + * Replace "mytoken" by some other word. |
| 29 | + * If you built the image (see below), remove `spikeinterface/` or replace it with your docker handle. |
| 30 | + |
| 31 | +3. Then open http://localhost:8888/lab?token=mytoken in a browser. |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +**Important Note** |
| 36 | +The `--rm` flag means the container is a one-off (will self-destroy upon closure). |
| 37 | +To make the container persitant, remove the `--rm flag` from the docker call. In which case, the container will persist. To start a stopped container, run `docker start spikeinterface` in a terminal, or use the Docker Desktop interface to start it. |
| 38 | + |
| 39 | +### How to build this image |
| 40 | +The container image is [available on DockerHub](https://hub.docker.com/repository/docker/spikeinterface/spikeinterface/). Providing you have Docker installed, it will automatically download when starting the container. |
| 41 | + |
| 42 | +If you want to build it, follow the instructions below. |
| 43 | +Open a terminal, navigate to the spikeinterface directory, then run: |
| 44 | +`docker build -t spikeinterface:0.2 .` |
| 45 | +On Linux systems, you can also use the build script (after making it executable `chmod +x build.sh`): |
| 46 | +`./build.sh` |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
0 commit comments