美文网首页
debian9 显卡驱动

debian9 显卡驱动

作者: ma8345 | 来源:发表于2018-11-27 16:01 被阅读0次

安装CUDA toolkit 和显卡驱动

在官网下载对应版本,https://developer.nvidia.com/cuda-downloads

image.png
sh cuda*.run

提示安装选择推荐显卡驱动
cuda安装位置:/usr/local/cuda-9.0
软链位置:/usr/local/cuda

环境变量配置:

  vim /etc/profile
      export PATH=/usr/local/cuda-9.0/bin:$PATH
      export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:/usr/lib/nvidia:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
 source /etc/profile
 nvcc -V

安装cudnn

下载地址:https://developer.nvidia.com/rdp/cudnn-download

image.png

解压

tar xf  cudnn-9.0-linux-x64-v7.1.tgz
cd cuda
cp include/cudnn.h /usr/local/cuda/include
cp lib64/libcudnn.* /usr/local/cuda/lib64

安装依赖

apt install linux-headers-$(uname -r)
apt install python3-pip 
pip3 install opencv-python imutils termcolor matplotlib nanotime tornado urllib3 sklearn setuptools scipy requests Pillow tensorflow-gpu

测试

>>>import tensorflow as tf
>>>hello = tf.constant('Hello, TensorFlow!')
>>>sess = tf.Session()
>>>print(sess.run(hello))

相关文章

网友评论

      本文标题:debian9 显卡驱动

      本文链接:https://www.haomeiwen.com/subject/prignftx.html