Sign inSign up

tboo/csbdeep_gpu_docker

By tboo

Updated 25 days ago

Run CSBDeep for Content Aware Image Restoration (CARE) instantly on a NVIDIA GPU.

Image
1

2.0K

tboo/csbdeep_gpu_docker repository overview

The fine print

  • Our Website

  • Documentation of the CSBDeep API

  • Please do not forget to cite our work: Content-Aware Image Restoration: Pushing the Limits of Fluorescence Microscopy Martin Weigert, Uwe Schmidt, Tobias Boothe, Andreas Mueller, Alexander Dibrov, Akanksha Jain, Benjamin Wilhelm, Deborah Schmidt, Coleman Broaddus, Siân Culley, Maurício Rocha-Martins, Fabián Segovia-Miranda, Caren Norden, Ricardo Henriques, Marino Zerial, Michele Solimena, Jochen Rink, Pavel Tomancak, Loic Royer, Florian Jug, Eugene W. Myers
    Nature Methods November 2018; doi: https://doi.org/10.1038/s41592-018-0216-7

  • The latest Docker image is based on NVIDIA's TensorFlow container Release 22.07-tf2 (build 41650896) and is intended for non-commercial use. For commercial use please refer to the license agreements from NVIDIA and the CSBDeep repository. Please click here for a detailed documentation of this container.

  • Please report bugs or ask questions regarding this Docker in our Github repository

Introduction

This Docker image is intended to get you quickly started with the CSBDeep toolbox for content aware image restoration (CARE) using Python. It provides a complete and ready-to-go software environment for training and applying CARE networks to your data.

Only a Linux operating system together with a working NVIDIA driver version 450 or greater is required. This GPU computing container requires a NVIDIA GPU with CUDA compute capability 6.0 or greater (list of CUDA capable GPUs). All software required to run CARE (CUDA, cuDNN, Tensorflow, Keras, Python, Jupyter, CSBDeep) comes with this Docker and a manual installation of this software is not necessary.

This guide is written for a setup on a Ubuntu Linux distribution (18.04 LTS or later).

System setup

  • Check your NVIDIA driver version and update it if necessary (v 450+ is required)
    $ nvidia-smi

  • Install the latest version of the Docker community edition (CE) and its depdendencies (containerd and docker-cli) available for your distribution. We highly recommend version 19.03 or later since these version ship with native nvidia-docker support. For example, on Ubuntu 18.04 LTS first download the packages:

$ wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/containerd.io_1.2.6-3_amd64.deb 
$ wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce-cli_19.03.7~3-0~ubuntu-bionic_amd64.deb
$ wget https://download.docker.com/linux/ubuntu/dists/bionic/pool/stable/amd64/docker-ce_19.03.7~3-0~ubuntu-bionic_amd64.deb

and install them via:

$ sudo dpkg -i containerd.io_1.2.6-3_amd64.deb  
$ sudo dpkg -i docker-ce-cli_19.03.7~3-0~ubuntu-bionic_amd64.deb 
$ sudo dpkg -i docker-ce_19.03.7~3-0~ubuntu-bionic_amd64.deb
  • Add your current user to the docker user group and reboot
    $ sudo usermod -a -G docker $USER
    $ sudo reboot

  • Test your Docker installation.
    $ docker run hello-world

  • Install the Nvidia container toolkit by adding the respective repository first, followed by the actual package installation. A detailed description for Ubuntu 18.04 here

  • Relaunch Docker
    $ sudo pkill -SIGHUP dockerd

  • Finally, download the CSBDeep docker file
    $ docker pull tboo/csbdeep_gpu_docker:latest

Launching the CSBDeep GPU Docker

  • Basic: Launch the docker (ports 8888 and 6006 are forwarded to your host machine so you can access jupyter and tensorboard which are running in the docker container)
    $ docker run --gpus all --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 -it --rm -p 8888:8888 -p 6006:6006 tboo/csbdeep_gpu_docker:latest

  • Optional: in multi-GPU environments you can specify the ID(s) of the GPU(s) you want to use in your container:
    $ docker run --gpus '"device=0"' --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 -it --rm -p 8888:8888 -p 6006:6006 tboo/csbdeep_gpu_docker:latest Use --gpus '"device=0,1'" for launching the docker with a selected set of GPUs based on their ID.

  • Recommended: If you want to mount a directory /local/dir from the host in a docker container directory e.g. /data use the following syntax to launch the docker:
    $ docker run --gpus all --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 -it --rm -p 8888:8888 -p 6006:6006 -v /local/dir:/data tboo/csbdeep_gpu_docker:latest
    This procedure is recommended as the docker container discards all the changes (including newly written files) from its file system after quitting. Mounting an 'external' directory prevents this while keeping the docker image 'clean'.

  • Optional: If you are experiencing trouble connecting to the internet from inside the docker, launch it by specifying the IP of your DNS server:
    $ docker run --gpus all --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 --dns 1.2.3.4 -it --rm -p 8888:8888 -p 6006:6006 -v /local/directory:/workspace/CSBDeep/mydata tboo/csbdeep_gpu_docker:latest

Using the CSBDeep GPU Docker

  • Once you launched the CSBDeep docker you are ready to use CSBDeep with Python as documented here

  • CSBDeep, including the Jupyter notebooks which are a great way to get started, are installed in the container directory /workspace/CSBDeep.

  • To use the Jupyter notebooks, navigate in the docker shell to the CSBDeep installation directory and start the Jupyter notebook server.
    $ cd /workspace/CSBDeep/ && jupyter notebook --ip 0.0.0.0 --no-browser --allow-root
    The terminal will provide you with a link to call the jupyter notebook. Simply replace 'hostname' in the link (http://hostname:8888/?token=....) by 'localhost' and open this link in a browser of your choice. You can now access the CSBDeep Jupyter notebooks which include a step by step tutorial to use CARE for denoising and isotropic reconstruction. To start the notebooks navigate to /examples/ in your Jupyter browser interface.

  • Optional: if you want to monitor the network training progress with tensorboard in real time you will need to start tensorboard in a new docker shell of the already running CSBDeep container. To start a new shell in a running container:
    $ docker exec -it <ID> bash (the container ID can be obtained by running $ docker ps on the host)
    Start Tensorboard with:
    $ tensorboard --logdir=.
    In a browser of your choice you can now navigate to localhost:6006/ on your host machine to monitor network training. Note: The training dashboard is automatically started after the first epoch of training has finished.

Changelog

  • August 24 2026 (tboo/csbdeep_gpu_docker:latest) updated to CSBDeep v0.8.2, TensorFlow 2.15.0 and CUDA 12.4.1

  • August 03 2022 (tboo/csbdeep_gpu_docker:v1.0) updated to CSBDeep v0.7.2, TensorFlow 2.9.1 and CUDA 11.7

  • October 29 2020 (tboo/csbdeep_gpu_docker:v0.9) updated to CSBDeep v0.6.0, TensorFlow 2.2 and CUDA 11 - This is a major update. If you prefer the CUDA10 and TF 1.14 based image please use the CSBDeep container v0.8 or lower.

  • February 12 2020 (tboo/csbdeep_gpu_docker: v0.8)
    updated to CSBDeep v0.5.0

  • August 19 2019 (tboo/csbdeep_gpu_docker:v0.7)
    updated to CSBDeep v0.4.0, TensorFlow 1.14 and CUDA 10 - This is a major update. If you prefer the CUDA9 based image please use the CSBDeep container v0.6 or lower.

  • February 8 2019 (tboo/csbdeep_gpu_docker:v0.6)
    updated to CSBDeep v0.3.0 and pip 19.0.1

  • December 7 2018 (tboo/csbdeep_gpu_docker:v0.5)
    updated to CSBDeep v0.2.2

  • November 26 2018 (tboo/csbdeep_gpu_docker:v0.4)
    updated to CSBDeep v0.2.1 and pip 18.1

  • September 21 2018 (tboo/csbdeep_gpu_docker:v0.3)
    fixed python3 system link issue

  • July 16 2018 (tboo/csbdeep_gpu_docker:v0.2)
    added python-tk

Tag summary

Content type

Image

Digest

sha256:f771e1953

Size

6.6 GB

Last updated

25 days ago

docker pull tboo/csbdeep_gpu_docker