Open liuty10 opened 5 years ago
install CUDA:
Download from : https://developer.nvidia.com/cuda-80-ga2-download-archive
Installation Instructions:
sudo dpkg -i cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
sudo apt-get update
sudo apt-get install cuda
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb" wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} sudo dpkg -i ${CUDA_REPO_PKG} sudo apt-get update sudo apt-get -y install cuda
CUDNN_TAR_FILE="cudnn-8.0-linux-x64-v6.0.tgz" wget http://developer.download.nvidia.com/compute/redist/cudnn/v6.0/${CUDNN_TAR_FILE} tar -xzvf ${CUDNN_TAR_FILE} sudo cp -P cuda/include/cudnn.h /usr/local/cuda-8.0/include sudo cp -P cuda/lib64/libcudnn /usr/local/cuda-8.0/lib64/ sudo chmod a+r /usr/local/cuda-8.0/lib64/libcudnn
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}} export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Summary: nvidia driver first, then tensorflow-gpu==1.4 cuda8.0 cudnn6.0 Then, you can use tensorflow:
import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') sess = tf.Session() print(sess.run(hello))
~/Downloads/bin/protoc ./object_detection/protos/*.proto --python_out=.
export PYTHONPATH=$PYTHONPATH:pwd
:pwd
/slim
I have encountered some problems. So, I changed my version to: tensorflow1.13.1, cuda10.0, cuDNN7.4.2
install Nvidia drivers: Driver Version: 410.78 CUDA Version: 10.0 Follow instructions here: https://github.com/CS-FreeStyle/10000-How-To-Do-in-CS/issues/33
tensorflow 1.13 sudo pip3 uninstall tensorflow-gpu sudo pip3 install --upgrade tensorflow-gpu==1.13
cuda 10.0.130 https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal Follow the instructions that it gives.
Download cuDNN v7.4.2 (Dec 14, 2018), for CUDA 10.0 https://developer.nvidia.com/rdp/cudnn-archive $ sudo dpkg -i xxx.deb
or, you can, $ tar -xvzf cudnn-xxx-linux-x64-v5.1.tgz $ cd cuda $ sudo cp include/cudnn.h /usr/local/cuda/include $ sudo cp lib64/libcudnn.* /usr/local/cuda/lib64
Now, you can use tensorflow:
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
But, if you want to use tensorflow API, you need the following steps:
Download models from git: https://github.com/tensorflow/models
Set PATHONPATH
From tensorflow/models/research/
$ export PYTHONPATH=$PYTHONPATH:pwd
:pwd
/slim
Download proc and compile: https://github.com/protocolbuffers/protobuf/releases Download protoc-3.7.0-linux-x86_64.zip $ mkdir protoc-3.7 $ cd protoc-3.7 $ unzip protoc-3.7.0-linux-x86_64.zip
Then, compile with protoc From tensorflow/models/research/ $ protoc object_detection/protos/*.proto --python_out=.
Then, you should be able to use API for training.
But for evaluation, you still need to install COCOAPI.
If you use tensorboard:
Debian reference: https://blog.csdn.net/star_code/article/details/76616958
How to install Nvidia 1080Ti Driver: (Two ways)
Another way to install Nvidia driver is to use command: sudo ubuntu-drivers autoinstall In this way, you can install the recommended drivers for this particular system. It may be more stable and reliable.
Install cuda 10.01
https://developer.nvidia.com/cuda-80-ga2-download-archive
Installation Instructions:
Run sudo sh cuda_8.0.61_375.26_linux.run
Follow the command-line prompts
pip3 uninstall tensorflow-gpu pip3 install --upgrade tensorflow-gpu==1.4