Installation
It’s recommended that you install TensorFlow in your own Python virtual environment or conda environment. Be mindful that the TensorFlow installation with GPU capabilities is approximately 1GB in size.
Regardless of your use of a Python virtual environment or a conda environment, use the pip
tool for installation. The instructions below will enable TensorFlow to run on both GPU compute nodes and CPU-only nodes.
Python Virtual Environment OR Conda Environment
- Create and activate your virtualenv or conda env.
- Visit the TensorFlow with pip page to get the latest pip installation command for Linux.
Using SCC Modules
To see the available versions of TensorFlow in the module system run:
[rcs@scc1 ~] module avail tensorflow
Depending on which version you select, you will have to also load a python3
module or activate a conda environment. The version of Python needs to match the support provided by the module. Loading a tensorflow
module without a python3
module or activated conda environment will result in a message like this:
[rcs@scc1 ~] module load tensorflow/2.11.0
-------------------------------------------------------------------------------
WARNING: tensorflow/2.11.0 needs to be used with Python 3.7, 3.8, 3.9 or 3.10. This can be provided by a python3 module or via a conda
environment.
For example:
module load python3/3.8.10
module load tensorflow/2.11.0
OR:
module load miniconda/4.11.0
conda activate INSERT_YOUR_CONDA_ENV_HERE
module load pytorch/1.13.1
-------------------------------------------------------------------------------
Once an appropriate version of Python is available you can use the TensorFlow software normally from Python.