Ubuntu18.04+cuda10.0+cudnn7.5.0+tensorflow-gpu1.13.1+Pycharm2019环境搭建
Introduction
这是实践搭建Ubuntu18.04+cuda10.0+cudnn7.5.0+tensorflow-gpu1.13.1+Pycharm2019,写此博客记录搭建过程和遇到的问题,以备忘。
1. Ubuntu18.04 Installation:
windows10 和 Ubuntu18.04双系统的准备工作;
1.1 从官网下载Ubuntu18.04 LTS;
1.2 制作启动盘:
1.3 硬盘压缩,为Ubuntu留出硬盘空间(建议100G以上);
1.4 设置BIOS从U盘启动,安装Ubuntu,参考这篇博客;
补充几个细节:
1)在Ubuntu安装过程中,“安装启动器的设备“ 选择含 ”windows boot manager"选项,可以不用在windows中设置引导,
这在其他教程中并没有提到,并且可以在以后不经常使用Ubuntu时,通过设置BIOS启动项首选项为“windows boot
manager"设置为默认windows系统启动;
2)100G 分区方案:在Ubuntu 分区,通常分为四个挂载点:/ ,/boot,swap,/home,建议把/boot 分
40G(40960GB),swap分8G(8192MB),/boot分200MB,剩下的空间分给/home
1.5
2. cuda 10.0 and cudnn 7.5.0 Installation:
注:本博主尝试了cuda 10.1 + cudnn 7.5 for cuda 10.1,成功安装,但tensorflow-gpu不支持cuda 10.1,尝试工程浪费大量时间和精力,所以告诫不要安装cuda 10.1
2.1 下载cuda 10.0 和对应版本的cudnn 7.5 for cuda 10.0(需要注册登陆才能下载);
2.2 显卡驱动 Installation:
2.2.1 查看信息:
lspci | grep -i nvidia #参看显卡信息
uname -m && cat /etc/*release #查看Ubuntu版本
gcc --version #查看gcc版本
2.2.2 从官网下载显卡驱动;
2.2.3 安装显卡驱动:
1)禁用nouveau:
The Nouveau drivers are loaded if the following command prints anything:
lsmod | grep nouveau #如果开启将会显示信息
Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
- cuda 10.0 和 cudnn 7.5,参考这篇博客和官方文档cuda installation guide ,cudnn installation guide
Pycharm 2019 Installation:
直接在Ubuntu软件商店搜索pycharm下载
(未完待续)