Summary

Sourcehttps://www.tensorflow.org/

License:  Apache License 2.0

Path:  /software/TensorFlow and as conda environments

Documentationhttps://www.tensorflow.org/get_started/

TensorFlow™ is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them. The flexible architecture allows you to deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device with a single API. TensorFlow was originally developed by researchers and engineers working on the Google Brain Team within Google's Machine Intelligence research organization for the purposes of conducting machine learning and deep neural networks research, but the system is general enough to be applicable in a wide variety of other domains as well.

Using pre-installed tensorflow

Using modules
# setup python environment. 
# 
module load maxwell conda/3.9 cuda/11.2  # cuda 11.8 also seems to work
. conda-init  # or mamba-init
conda activate /software/jupyter/.conda/envs/tensorflow-2.11/

export TF_CPP_MIN_LOG_LEVEL=3 # get rid of tensorrt warnings

# use the environment
tensorboard --version
    2.11.2  

# on node with GPU(s)
python3 -c 'import tensorflow as tf; print(tf.test.is_built_with_cuda()); print(tf.config.list_physical_devices("GPU"))'
   True
   [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU'), PhysicalDevice(name='/physical_device:GPU:1', device_type='GPU')]


Running tensorflow in custom conda environment

There are a few tensorflow installations on the Maxwell cluster, but they will in many cases not match your requirements. It's however very simple to install it yourself.

# setup python environment
module load maxwell conda/3.9 cuda/11.2

# setup conda environment. It's a non-intrusive alternative to e.g. conda init bash, which has lots of side effects
. mamba-init   # you can also use conda instead, but mamba is much faster ...

# install tensorflow in your own conda environment, see for example https://docs.anaconda.com/anaconda/user-guide/tasks/tensorflow/
mamba create -n tf tensorflow
mamba activate tf