Tensorflow
On our Linux devices we are providing a Python Tensorflow Module ready to use that is accessible trough a Linux Environment Module. With the command “module” you have the possibility to add Tensorflow in many different versions. By default the newest is chosen.
Note: Tensorflow works only on computers with Intel-processors. Please check the list of our central clients if you want to use Tensorflow on them.
First, you need to pick the right Python version. At the moment we offer Python 2.7 and Python 3.8
For Python 3:
module load modules/Python3For Python 2
module load modules/Python2
Add the tensorflow module
module load tensorflow
Your current shell is now ready to import tensorflow
For Python 3
python3 -c 'import tensorflow as tf; print(tf.__version__)'For Python 2
python2 -c 'import tensorflow as tf; print(tf.__version__)'
You can display all existing version:
module avail -l tensorflow
More possibilities how to use “Linux Environment Modules” can be found on the man pages.
man module
How can I load tensorflow within a Jupyter notebook on ada using https://blogs.ethz.ch/isgdmath/jupyter-notebook-on-compute-clients-ada-x/ ?
Tensorflow has to be installed first.
You can do so with:
pip install --user tensorflow
After that, you can import ‘tensorflow’ in your Python scripts in Jupyter as well as outside of it.