Setting up your GPU

How to speed up cellfinder by using your GPU

Introduction

cellfinder will run quite happily on your CPU, but the machine learning parts (classifying cell candidates as cells or artefacts, and Training the network) run much faster using GPU.

Requirements

The requirements are the same as those for tensorflow GPU support, but essentially you need:

  • A relatively modern Windows or Linux based machine (unfortunately GPU acceleration on macOS is not supported).

  • An NVIDIA GPU with CUDA Compute Capability of 3.5 or higher (see the list here) with at least 6GB memory. Basically any relatively expensive NVIDIA GPU released in the last 5 years should be OK. So far, we've tested:

    • GTX 1070

    • GTX 1080

    • TITAN GTX

    • Quadro P5000

    • Quadro RTX 5000

    • RTX 2080

    • RTX 2080 (laptop)

    • TITAN RTX

  • Someone who has the admin password and (ideally) knows what they are doing to install things.

Installation

These instructions will vary somewhat between operating systems, and on how your machine is set up (and how much control your institute will let you have).

Installing NVIDIA drivers

The first thing you definitely need are the drivers for your GPU, which can be downloaded here. Hopefully, these will have been installed when your machine was set up, but for GPU support in cellfinder, you will need version 418.x or greater.

Installing CUDA and cuDNN

cellfinder uses tensorflow which relies upon CUDA and cuDNN. cellfinder requires CUDA version 10.1 and cuDNN 7.6 or greater.

CUDA and cuDNN are not too hard to install, but sometimes other software on your machine relies on different versions. It is possible to switch between the two, and it is easier if you are using conda (see here). However, I recommend that you use conda and install CUDA and cuDNN via conda:

conda install cudatoolkit=10.1 cudnn

This method is easier, and also doesn't require any admin rights (useful on a cluster or shared machine).

if this does not work for any reason, or you wish to have a system-wide installation of CUDA and cuDNN, then CUDA can be downloaded here and cuDNN from here. N.B. you will need to sign up for a (free) account to download cuDNN.