被tensorflow 1.8, ubuntu 16.04, cuda 9.0, nvidia-390折磨了5天,终于上坑,留下指南,造福后人。
1.先把依赖搞清楚:
tensorflow 1.8依赖cuda 9.0,cuda 9.0依赖nvidia-390。
2.坑:
ubuntu 16.04源里只有nvidia-384,nvidia-390太新还没支持。
怎么办?
如果你不在天朝以下可以在个人源中安装nvidia-390
- sudo add-apt-repository ppa:graphics-drivers/ppa
- sudo apt update
- sudo apt install nvidia-390
如果你在天朝ppa速度极慢,只能手动从这里下载:
http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu/pool/main/n/nvidia-graphics-drivers-390/nvidia-390_390.48-0ubuntu0~gpu16.04.3_amd64.deb
3. 安装顺序,很关键,必需安装先cuda再nvidia-390的顺序,否则会造成loop login 循环登陆 无法进入桌面:
- 1. 参照NVIDIA的文档安装cuda9.0: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu-installation
- 2. 安装下载的nvidia-390 deb文件:dpkg -i path/to/nvidia-390_390.48-0ubuntu0~gpu16.04.3_amd64.deb
- 3. 安装依赖包:sudo apt-get install -f 。原因是 When
dpkg
install a package and package dependency is not satisfied, it leaves the package inunconfigured
state and that package is considered as broken.sudo apt-get install -f
command tries to fix this broken package by installing the missing dependency.
4. 完。
原文地址:https://www.cnblogs.com/congliu/p/9040921.html
时间: 2024-10-09 12:28:03