Skip to content

A new version of SD Connect and SD Desktop will be available from Monday, September 28. The major upgrade will introduce significant improvements, but also includes changes that are not compatible with the current version of the service. Click here to review the available support materials.

Warning!

Puhti and Mahti computing services have been decommissioned and no new jobs are accepted or executed on its compute nodes. Puhti and Mahti login nodes and storage services are planned to remain available until 15 October 2026. Clean up unnecessary files and move any data you need to keep by 31 August 2026. See the Roihu data migration guide for instructions on transferring your data to Roihu.

TensorFlow

Deep learning framework for Python.

News

3.9.2026 TensorFlow version 2.21 is now available on Roihu-CPU. Naturally this version does not support GPU acceleration.

16.6.2026 TensorFlow is now available on Roihu-GPU, the module has been renamed python-tensorflow.

Available

Currently supported TensorFlow versions:

Version Module Roihu-GPU Roihu-CPU LUMI Notes
2.21.0 python-tensorflow/2.21 X X - Default on Roihu
2.16.1 tensorflow/2.16 X Default on LUMI
2.12.0 tensorflow/2.12 X
2.11.0 tensorflow/2.11 X
2.10.0 tensorflow/2.10 X
2.9.0 tensorflow/2.9 X
2.8.0 tensorflow/2.8 X

Includes TensorFlow and Keras with GPU support via CUDA/ROCm. The version on Roihu-CPU naturally does not support GPUs, but has been made available for light workloads and workloads that need x86_64 CPU architecture.

If you find that some package is missing, you can often install it yourself using pip install. It is recommended to use Python virtual environments. See our Python documentation for more information on how to install packages yourself. If you think that some important package should be included in the module provided by CSC, please contact our servicedesk.

All modules are based on containers using Apptainer (previously known as Singularity). Wrapper scripts have been provided so that common commands such as python, python3, pip and pip3 should work as normal.

License

TensorFlow is licensed under Apache License 2.0.

Usage

To use the default version of TensorFlow on Roihu-GPU or Roihu-CPU, initialize it with:

module load python-tensorflow

To access TensorFlow on LUMI:

module use /appl/local/csc/modulefiles/
module load tensorflow

If you wish to have a specific version (see above for available versions), use:

module load python-tensorflow/2.21  # on Roihu
module load tensorflow/2.12         # on LUMI

Please note that the modules already include CUDA/ROCm libraries, so there is no need to load cuda or rocm modules separately!

This command will also show all available versions:

module avail python-tensorflow  # on Roihu
module avail tensorflow         # on LUMI

To check the exact packages and versions included in the loaded module you can run:

pip list

Warning

Note that login nodes are not intended for heavy computing, please use slurm batch jobs instead. See our instructions on how to use the batch job system.

Example batch script

Example batch script for reserving one GPU and 1/4 (1/8 on LUMI) of the available CPU cores in a single node:

#!/bin/bash
#SBATCH --account=<project>
#SBATCH --partition=gpumedium
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=72
#SBATCH --gres=gpu:gh200:1
#SBATCH --time=1:00:00

module load python-tensorflow/2.21
srun python3 myprog.py <options>
#!/bin/bash
#SBATCH --account=<project>
#SBATCH --partition=small
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=7
#SBATCH --mem=15G
#SBATCH --time=1:00:00

module load python-tensorflow/2.21
srun python3 myprog.py <options>
#!/bin/bash
#SBATCH --account=<project>
#SBATCH --partition=small-g
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=7
#SBATCH --gpus-per-node=1
#SBATCH --mem=60G
#SBATCH --time=1:00:00

module use /appl/local/csc/modulefiles/
module load tensorflow/2.12
srun python3 myprog.py <options>

Please read the section on Efficient GPU utilization in our Machine learning guide to learn how to use the GPU efficiently.

Big datasets, multi-GPU and multi-node jobs

If you are working with big datasets, or datasets that contain a lot of files, please read the data section of our Machine learning guide. In particular, please do not read a huge number of files from the shared file system, use fast local disk or package your data into larger files instead!

For multi-GPU and multi-node please read the Multi-GPU and multi-node section of our Machine learning guide

More information