Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 2.74 KB

using-gpu.md

File metadata and controls

47 lines (31 loc) · 2.74 KB
description
How to speed up cellfinder by using your GPU

Setting up 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 450.x or greater.

Installing CUDA and cuDNN

cellfinder uses tensorflow which relies upon CUDA and cuDNN. cellfinder requires CUDA and cuDNN.

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 11.2 and cuDNN 8.1 via conda. On linux you can run:

conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0

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.