1. system: kubuntu: 18.04, i have install nvidia driver 390.48.
there are two userful links to install driver:
1.https://askubuntu.com/questions/61396/how-do-i-install-the-nvidia-drivers
2.https://askubuntu.com/questions/661922/how-am-i-supposed-to-use-nvidia-prime?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
because the machine is dual Gpu with intel and nvidia, so we need to use nvidia-prime .
in kubunt, i use the system setting drivers to choose nvidia drivers.
in debian, i use official site with nvidia and nvidia-prime to install nvidia drivers.
2.install cuda
1. i install cuda9.2, and it make errors. then i sudo apt-get --purge remove (some have installed packages in cuda9.2, just copy some of them, which shows in terminal ).
2. then i check CUDA Toolkit and Compatible Driver Versions: https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
you can see nvidia driver390 is not compatible with cuda9.2, so i choose cuda9.0.
3. use local cuda9.0 deb to install , and i installed successfully. but after that , i can't use nvidia-smi and nvidia-settings.
4. i reboot, and after that , i can use nvidia-smi.
3. install cudnn
1. just download cudnn7.1.4 with cuda 9.0 and follows official site.
4. install libcupti-dev
1. i follows the tensorflow official site, i just can't find the package.
2. i follws the github issues , and use apt-cache to find
cuda-command-line-tools packageand i need use apt-get install cuda-command-line-tools-9-0 to install.
5.install tensorflow
1. use virtualenv installation method.
2.when i import tensorflow, there is an error: ython: Relink `/lib/x86_64-linux-gnu/libudev.so.1' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime'.
and i follows : https://github.com/tensorflow/tensorflow/issues/19375
i add this line:
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
to ~/.bashrc. and it turns ok.
so , that's all.