An open-source software library for Machine Intelligence

Home Page





Tensorflow is free to use under the Apache Licence 2.0



module avail tensorflow

to see which versions of tensorflow are available. Use

module load tensorflow/version

to get access to tensorflow.

This will set the path to a wrapper for python running within a singularity container. It can not be used together with other python modules, but it is possible to create a virtualenv, see description under.

The wrapper mounts your home directory, /work, /projects and /cluster. Changes made in files elsewhere are not kept after execution.

Note, all the commands shown below only work on nodes with GPUs. If you want to run on nodes without GPUs, add the suffix _wo_gpucheck, e.g., tf_python_wo_gpucheck.

To run tensorflow in a job script, use

tf_python pythonfile.py


If you need additional python packages, you can create a python virtualenv. There are several limitations in the usage of this. Most important - it cannot be activated the same way as you can do with virtualenvs elsewhere. This is a short description on how to create a virtualenv with tensorflow and regex.

tf_virtualenv the-virtualenv      # A wrapper to virtualenv inside the container
tf_image_shell                        # Launches a shell inside the container
the-virtualenv/bin/pip install regex # Installs regex in the virtualenv  

To use the python in a specific virtualenv, you can use the wrapper like this:

tf_venv_python /path/to/the-virtualenv /path/to/yourpythonfile.py
Published Apr. 26, 2017 9:02 AM - Last modified Nov. 16, 2017 7:35 PM