【Tensorflow】Tensorflow r1.0, Ubuntu, gpu, conda安裝說明

Install Anaconda and pythonpython

 

1. cuda-8.0linux

download cuda_8.0.61_375.26_linux.runapi

./cuda_8.0.61_375.26_linux.runbash

 

2.cudnnv5.1 for cuda-8.0python2.7

download cudnn-8.0-linux-x64-v5.1.tgzgoogle

tar xvzf cudnn-8.0-linux-x64-v5.1.tgzblog

cp cuda/include/cudnn.h cuda-8.0/includeip

cp cuda/lib64/libcudnn* cuda-8.0/lib64pip

 

3. set pathio

vi .bashrc

----- add to end

export CUDA_HOME=[path for cuda-8.0]

export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/extras/CUPTI/lib64

-----

source .bashrc

nvcc --version

 

4.tensorflow

conda create -n tensorflow

source activate tensorflow

(tensorflow)$ pip install --ignore-installed --upgrade TF_PYTHON_URL

TF_PYTHON_URL for python2.7: https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0-cp27-none-linux_x86_64.whl

 

5. set gpu

http://www.acceleware.com/blog/cudavisibledevices-masking-gpus

export CUDA_VISIBLE_DEVICES=3

相關文章
相關標籤/搜索