On my Ubuntu systems I use (to be executed in the same terminal as the one in which you run TensorFlow):
# CUDA 7.5: export PATH=/usr/local/cuda-7.5/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH # CUDA 8.0: export PATH=/usr/local/cuda-8.0/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
You may also want to point to CuDNN and CNMeM:
# CuDNN: export LD_LIBRARY_PATH=/scratch1/francky/cudnn/cuda/lib64:$LD_LIBRARY_PATH export CPATH=/scratch1/francky/cudnn/cuda/include:$CPATH export LIBRARY_PATH=/scratch1/francky/cudnn/cuda/lib64:$LD_LIBRARY_PATH # CNMeM: export LD_LIBRARY_PATH=/scratch1/francky/cudnn/cnmem/build:$LD_LIBRARY_PATH export CPATH=/scratch1/francky/cudnn/cnmem/include:$CPATH export LIBRARY_PATH=/scratch1/francky/cudnn/cnmem/build:$LD_LIBRARY_PATH
FYI: Is there any point in using CNMeM when running TensorFlow?