Use with docker#



Install NVIDIA Container Toolkit

Full instructions are here, but e.g. for Ubuntu:

Setup repository and GPG key:

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
   && curl -s -L | sudo apt-key add - \
   && curl -s -L$distribution/nvidia-docker.list | \
   sudo tee /etc/apt/sources.list.d/nvidia-docker.list

Install NVIDIA docker package:

sudo apt-get update
sudo apt-get install -y nvidia-docker2

Restart docker daemon:

sudo systemctl restart docker

Running cellfinder#

To run with GPU support, and mount the current working directory at /data:

docker container run --mount type=bind,source=${PWD},target=/data --gpus all -it

This will open up a bash prompt, and you can use cellfinder (or brainreg etc.) to analyse your data (mounted at /data) as normal, e.g.:

cellfinder -s /data/brain1/channel0 -b /data/brain1/channel1 -v 5 2 2 --orientation psl -o /data/analysis/brain1 --trained-model /data/models/retrained.h5

To leave the docker container when done, just exit.The data will be saved onto the host system, at your current working directory (you can mount different directories, or multiple directories, see the docker documentation).