概述
重复配置anaconda 在 ubuntu 上记录。配置 tensorlfow-gpu。
1。显卡配置过程。
不虚重新修改文件,重启,文本模式下修改。
本机是 在ubuntu 18下 安装配置的。
之前 安装显卡时 是在这个文档中 安装的:
https://blog.csdn.net/u014682691/article/details/80605201
步骤如下:
1. 打开终端,删除旧的显卡驱动;
sudo apt-get purfe nvidia*
2. 禁用自带的nouveau nvidia 驱动
创建一个文件通过命令 sudo vim /etc/modprobe.d/blacklist-nouveau.conf
并添加如下内容:
blacklist nouveau
options nouveau modeset=0
再更新一下
sudo update-initramfs -u
修改后需要重启系统。确认下Nouveau是已经被你干掉,使用命令:lsmod|grep nouveau
3.重启系统至init3(文本模式),也可以县境如图形界面运行init3进入文本模式 ,再按摩庄下载的驱动就无问题,首先我们需要结束x-window 服务。否则驱动无法正常安装
关闭X-window ,使用sudo serivce lightdm stop ,然后切换tty1控制台:Ctrl+alt+F1 即可。
4.接下来就是最关键的一步
sudo./NVIDIA.run开始安装,安装过程比较快,根据提示选择即可最后安装完毕后,重新启动X-Window:sudo service lightdm start,然后Ctrl+Alt+F7进入图形界面;
最后测试一下是否安装成功
nvidia-smi
nvidia-settings
note:目前不知道,这种简单的显卡安装放入法会有什么弊端,之后如果有问题,需要按照第二种完成安装,再回来补充。
遇到的问题:
su : 认证失败
2 在conda 模式下安装opencv ,安装的是opencv-python,不知与opencv 有什么区别
编译cmake opencv
Do you accept the previously read EULA?
accept/decline/quit: accept
You are attempting to install on an unsupported configuration. Do you wish to continue?
(y)es/(n)o [ default is no ]: y
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
(y)es/(n)o/(q)uit: y
Do you want to install the OpenGL libraries?
(y)es/(n)o/(q)uit [ default is yes ]: y
Do you want to run nvidia-xconfig?
This will update the system X configuration file so that the NVIDIA X driver
is used. The pre-existing X configuration file will be backed up.
This option should not be used on systems that require a custom
X configuration, such as systems with multiple GPU vendors.
(y)es/(n)o/(q)uit [ default is no ]: y
Do you want to run nvidia-xconfig?
This will update the system X configuration file so that the NVIDIA X driver
is used. The pre-existing X configuration file will be backed up.
This option should not be used on systems that require a custom
X configuration, such as systems with multiple GPU vendors.
(y)es/(n)o/(q)uit [ default is no ]: y
Install the CUDA 9.0 Toolkit?
(y)es/(n)o/(q)uit: y
Enter Toolkit Location
[ default is /usr/local/cuda-9.0 ]:
Do you want to install a symbolic link at /usr/local/cuda?
(y)es/(n)o/(q)uit: y
最后 为:
Installing the NVIDIA display driver...
A system reboot is required to continue installation. Please reboot then run the installer again. An attmept has been made to disable Nouveau. If this message persists after reboot, please see the display driver log file at /var/log/nvidia-installer.log for more information.
===========
= Summary =
===========
Driver: Reboot required to continue
Toolkit: Installation skipped
Samples: Installation skipped
To uninstall the NVIDIA Driver, run nvidia-uninstall
Logfile is /tmp/cuda_install_11806.log
root@l1:/home/l1/下载#
----------------------------------------------------------------------------------------------------------------------------------------
安装四个剩余四个补丁包
cuda_9.0.176.1_linux.run
cuda_9.0.176.2_linux.run
cuda_9.0.176.3_linux.run
cuda_9.0.176.4_linux.run
安装第一个补丁:
Do you accept the previously read EULA?
accept/decline/quit: accept
Enter CUDA Toolkit installation directory
[ default is /usr/local/cuda-9.0 ]:
Installation directory '/usr/local/cuda-9.0' does not have a version.txt file! Ensure you are installing to an existing toolkit directory.
Options:
--silent : Specify a command-line, silent installation
--installdir=dir : Customize installation directory
--accept-eula : Implies acceptance of the EULA
--help : Print help message
Specifying a silent installation also initiates a command-line installation.
安装第二个补丁:
Do you accept the previously read EULA?
accept/decline/quit: accept
Enter CUDA Toolkit installation directory
[ default is /usr/local/cuda-9.0 ]:
Installation directory '/usr/local/cuda-9.0' does not have a version.txt file! Ensure you are installing to an existing toolkit directory.
Options:
--silent : Specify a command-line, silent installation
--installdir=dir : Customize installation directory
--accept-eula : Implies acceptance of the EULA
--help : Print help message
Specifying a silent installation also initiates a command-line installation.
安装第三个补丁:
Do you accept the previously read EULA?
accept/decline/quit: accept
Enter CUDA Toolkit installation directory
[ default is /usr/local/cuda-9.0 ]:
Installation directory '/usr/local/cuda-9.0' does not have a version.txt file! Ensure you are installing to an existing toolkit directory.
Options:
--silent : Specify a command-line, silent installation
--installdir=dir : Customize installation directory
--accept-eula : Implies acceptance of the EULA
--help : Print help message
Specifying a silent installation also initiates a command-line installation.
安装第四个补丁:
Do you accept the previously read EULA?
accept/decline/quit: accept
Enter CUDA Toolkit installation directory
[ default is /usr/local/cuda-9.0 ]:
Installation directory '/usr/local/cuda-9.0' does not have a version.txt file! Ensure you are installing to an existing toolkit directory.
Options:
--silent : Specify a command-line, silent installation
--installdir=dir : Customize installation directory
--accept-eula : Implies acceptance of the EULA
--help : Print help message
Specifying a silent installation also initiates a command-line installation.
l1@l1:~/下载$
最后
以上就是秀丽早晨为你收集整理的2020-09-16 tensorflow-gpu 配置记录的全部内容,希望文章能够帮你解决2020-09-16 tensorflow-gpu 配置记录所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复