Where to Get GPU Software

To use the GPUs installed in the (2) stoomboot nodes available through the “gpu” queue, and the interactive stbc-g1, stbc-g2 and wn-lot-008 nodes, software that supports GPUs is required.

CUDA

The drivers for the GPUs and following versions of the the NVIDIA CUDA libraries are installed:

  • 9.2

  • 10.2

  • 11.4

The relevant version of the cuDNN library is also installed.

Python + GPU

To get access to Python software in an environment that supports using the GPUs, it is recommended to use conda to create a virtual environment, activate it and install the software you need.

virtualenv

Create and activate a new virtual environment

Activate the virtual environment using:

$> conda create --prefix /data/your_project/your_username/gpu_venv python=3.9
$> conda activate /data/your_project/your_username/gpu_venv
(gpu_venv) $>

Installing Python packages inside the virtualenv

To install additional software inside the virtualenv, after activating it, use conda to install it; e.g.:

(gpu_venv) $> conda install tensorflow=2.6.2
(gpu_venv) $> conda install pytorch=1.10.0

Sometimes different builds are available, e.g. for different python versions, CUDA versions or for CPU. These can be selected by specifying the exact build:

(gpu_venv) $> conda search tensorflow
tensorflow                     2.6.2 cpu_py37h2b38087_0  conda-forge
tensorflow                     2.6.2 cpu_py38hbed0dc1_0  conda-forge
tensorflow                     2.6.2 cpu_py39h1b7c303_0  conda-forge
tensorflow                     2.6.2 cuda102py37h80be449_0  conda-forge
tensorflow                     2.6.2 cuda102py38h4357c17_0  conda-forge
tensorflow                     2.6.2 cuda102py39h87695c4_0  conda-forge
tensorflow                     2.6.2 cuda110py37h4801193_0  conda-forge
tensorflow                     2.6.2 cuda110py38h1096b06_0  conda-forge
tensorflow                     2.6.2 cuda110py39h016931e_0  conda-forge
tensorflow                     2.6.2 cuda111py37h557cc93_0  conda-forge
tensorflow                     2.6.2 cuda111py38h862ebb2_0  conda-forge
tensorflow                     2.6.2 cuda111py39h50553a9_0  conda-forge
tensorflow                     2.6.2 cuda112py37hada678f_0  conda-forge
tensorflow                     2.6.2 cuda112py38ha230376_0  conda-forge
tensorflow                     2.6.2 cuda112py39h9333c2f_0  conda-forge
(gpu_venv) $> conda install tensorflow=2.6.2=cuda112py39h9333c2f_0

Using the software

Once things are installed, they can be used directly:

(gpu_venv) $> python
Python 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:20:46)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> tf.config.list_physical_devices('GPU')
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU'), PhysicalDevice(name='/physical_device:GPU:1', device_type='GPU')]