Skip to content

TensorFlow 2.5 installation

Warning

CUDA version >= 11.1is currently disabled on the HPCC GPU nodes. It'll be enabled again in Jan 2022 after system upgrade. Meanwhile, you can either install TF with a version older than 2.5 or use HPCC-installed TF (run "getexample TensorFlow_example").

To run TF-GPU , we need to log into a GPU dev-node such as dev-amd20-v100.

To install

1
2
3
4
5
6
7
8
9
module purge
module load GCC/8.2.0-2.31.1  
module load cuDNN/8.0.5.39-CUDA-11.1.1
module load Python

virtualenv -p python3 tf2env-Jul2021
source tf2env-Jul2021/bin/activate
pip install --upgrade tensorflow
deactivate

To test

1
2
3
4
5
6
7
8
9
module purge
module load GCC/8.2.0-2.31.1  
module load cuDNN/8.0.5.39-CUDA-11.1.1
module load Python
source tf2env-Jul2021/bin/activate
python
>>> import tensorflow as tf
>>> print (tf.__version__)
>>> print("Num GPUs Available:", len(tf.config.experimental.list_physical_devices('GPU')))