This guide is an adaption of the README file provided by Bernie Kirby in the directory /usr/local/tensorflow and /usr/local/tensorflow/v100 on Artemis.


GPU versions of Tensorflow only work on GPU nodes. You cannot run GPU versions of Tensorflow on any other Artemis node.

Tensorflow and Keras are available on Artemis HPC, but you need to install them in a Python virtual environment to use them. We cannot make these software packages available in a module because the different versions conflict with each other. Installing them in a Python virtual environment ensures that your existing enviroment will not conflict with these software packages.


Only the Tensorflow packages on Artemis will work. Tensorflow downloaded from the internet will not work directly on Artemis. If you would like to use a new version of Tensorflow, submit a High Performance Computing request for it to be installed.

To create your own Python virtual environment and install Tensorflow, enter these commands from a login node:

$ module load python/3.6.5
$ virtualenv --system-site-packages tf
$ source tf/bin/activate
(tf) $ module load cuda/9.1.85
(tf) $ pip install /usr/local/tensorflow/v100/tensorflow-1.8.0-cp36-cp36m-linux_x86_64.whl

The virtual environment here is called “tf”, but you can name it whatever you want.

Alternative Tensorflow versions

Available Tensorflow versions are installed in


Non-GPU version are installed in:


To install a non-gpu version of Tensorflow, create another virtual environment using the nogpu Tensorflow package:

$ module load python/3.6.5
$ virtualenv --system-site-packages tf-nogpu
$ source tf-nogpu/bin/activate
(myenv)  pip install /usr/local/tensorflow/nogpu/tensorflow-1.8.0-cp36-cp36m-linux_x86_64.whl

Example job script

An example job script for Tensorflow is:

#PBS -P Project
#PBS -l select=1:ncpus=4:mem=4gb:ngpus=1
#PBS -l walltime=2:00:00

module load python/3.6.5
source tf/bin/activate
module load cuda/9.1.85
module load openmpi-gcc/3.0.0-cuda

python myscript.py