Well I got past the Bazel thing (I think) by downloading and installing the binary.
Then the next issue was to try to run the tensor flow config script. However this wants to know a bunch of info which is tricky to find, the worst being the location of the cudnn library. It turns out that the headers are installed in /usr/include and the libs in /usr/lib/x86_64-linux-gnu/ and this script cant handle that. I had to copy the header to /usr/local/cuda/include and the libs to lib64 in the same directory. Also I had to add the libraries to the search path by adding the path to /etc/ld.so.conf.d/cuda.conf and running sudo ldconfig which is something I hadn't seen before.
I'm compiling TensorFlow now from source. I can't believe how many horrible warning messages are generated by this code.