1

I am trying to run tensorflow on a cuda machine over the cloud where I do not have sudo privileges.

I installed tensorflow in a virtualenv but I am not able to point it towards a specific cuda version. Can this be only done when installing from source?

2 Answers 2

3

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?

Sign up to request clarification or add additional context in comments.

1 Comment

is there any way this can be set to run automatically when the virtualenv is launched? just like placing it in .bashrc would do...
0

Usually CUDA_HOME allows to solve such kind of issues. As for TensorFlow up to 0.12, the homepage gives detailed information.

Version 1.0 is available now, and the documentation has been updated (not re-read at this point), so there might be extra information there if you switched.

1 Comment

I tried setting the CUDA_HOME variable but it did not work. I have multiple cuda versions installed. I need to point it to version 8.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.