How to export PATH for sublime build tool?
Ok I got it:
The problem is that the LD_LIBRARY_PATH variable was missing. I only exported it in .bashrc.
When I add 
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64\
                         ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
to ~/.profile it's working (don't forget to restart). 
It also works if I start sublime from terminal with subl which passes all the variables.
I wanted to create a new "build tool" for sublime text, so that I can run my python scripts with an anaconda env with tensorflow. On my other machines this works without a problem, but on my ubuntu machine with GPU support I get an error. 
I think this is due to the missing paths. The path provided in the error message doesn't contain the cuda paths, although I've included them in .bashrc. 
Update
I changed ~/.profile to export the paths. But tensorflow still won't start from sublime. Running my script directly from terminal is no problem.
I get ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory
So somehow the GPU stuff (cuda?) can not be found
Thanks