群星怎么让服务器稳定,DL服务器主机环境配置(ubuntu14.04+GTX1080+cuda8.0)解决桌面重复登录...
前面部分是自己的记录,后面方案部分是成功安装驱动+桌面的正解
问题的开始在于:登录不了桌面,停留在重复输入密码界面
博文中分析的结论:
虚拟机中不能直接调用物理显卡进行 CUDA 编程;虚拟机中运行 CUDA 需要硬件和软件的配合才能使用,对于一般使用者可能暂时不太可能的。
参考博文:
Ctrl+alt+F1进入字符界面,关闭图形界面
sudo service lightdm stop //必须有,不然会安装失败
sudo /etc/init.d/lightdm stop //一样的命令
sudo chmod 755 NVIDIA-Linux-x86_64-367.27.run //获取权限
sudo ./NVIDIA-Linux-x86_64-367.27.run //安装驱动
Accept
Continue installation
安装完成之后
sudo service lightdm start
图形界面出现,然后关机,由让人重复输入密码,登录不了
$ sudo /etc/init.d/gdm stop
$ sudo nvidia-installer --update
$ sudo /etc/init.d/gdm start
升级到375版本, 还是没用,启动进入不了桌面,重复登录
Uninstall previous nvidia drivers.
$ sudo apt-get purge nvidia-*
Stop light gdm (graphical interface)
$ sudo service lightgdm
Go to tty (CTRL+ALT+F1). Set your init state to 3 (text only mode). It is important to do this. Note these commands on a paper or something. I experienced sometimes the tty does not show with the newest driver. I just ssh to my PC as a way around.
$ sudo init 3
Log in to tty and cd to the directory where your have downloaded the driver.
$ sudo ./NVIDIA-Linux-x86_64-367.35.run
It will ask if you want to install 32-bit libraries, say no (assuming you do not have a 32-bit OS, hopefully. If you do have a 32-bit OS it is a good idea to upgrade…)
In a few minutes it is done….smooth. Reboot your PC
$ sudo reboot
update 之后还是不能进 图形界面
Uninstall previous nvidia drivers.
sudo apt-get purge nvidia-*
sudo apt-get autoremove
sudo apt-get --purge remove nvidia-*
remove 之后,
nvidia-smi
还是能看到gpu的。why?
卸载不了?
sudo apt-get install nvidia-prime
$ sudo /etc/init.d/lightdm stop
$ sudo nvidia-installer --update
$ sudo /etc/init.d/lightdm start
升级到375版本, 还是没用,启动进入不了桌面,重复登录
有人说,安装必须要在安装桌面前安装GTX 1080 driver,后面方案验证来看, 那个参数才是关键。
解决方法
利用sudo gedit /etc/modprobe.d/blacklist-nouveau.conf新建blacklist-nouveau.conf文件,输入命令
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
保存并退出。这一步是为了禁掉Ubuntu自带开源驱动nouveau。之后sudo reboot重启系统。在终端执行命令
lsmod | grep nouveau
查看nouveau模块是否被加载。如果什么都没输出,则执行下一步。
根本问题在于 参数: --no-opengl-files
sudo /etc/init.d/lightdm stop
sudo ./NVIDIA-Linux-x86_64-375.20.run --no-opengl-files
sudo /etc/init.d/lightdm start
即可以正常登录界面了!!
在安装过程中的选项:
Accept
Continue installation
register the kernel moudle sources with DKMS?
NO
Would you like to run the nvidia-xconfig utility to automatically update your X Configuration file so set the NVIDIA X driver will be used when you restart X?
NO
Install 32-Bit compatibility libraries?参考
NO
cuda8.0安装
运行
sudo sh cuda_8.0.44_linux.run
选项如下所示:
Description
This package includes over 100+ CUDA examples that demonstrate
various CUDA programming principles, and efficient CUDA
implementation of algorithms in specific application domains.
The NVIDIA CUDA Samples License Agreement is available in
Do you accept the previously read EULA?
accept/decline/quit: accept
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 367.48?
(y)es/(n)o/(q)uit: n
Install the CUDA 8.0 Toolkit?
(y)es/(n)o/(q)uit: y
Enter Toolkit Location
[ default is /usr/local/cuda-8.0 ]:
Do you want to install a symbolic link at /usr/local/cuda?
(y)es/(n)o/(q)uit: y
Install the CUDA 8.0 Samples?
(y)es/(n)o/(q)uit: y
Enter CUDA Samples Location
[ default is /home/c302 ]:
Installing the CUDA Toolkit in /usr/local/cuda-8.0 ...
Installing the CUDA Samples in /home/c302 ...
Copying samples to /home/c302/NVIDIA_CUDA-8.0_Samples now...
Finished copying samples.
===========
= Summary =
===========
Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-8.0
Samples: Installed in /home/c302
Please make sure that
- PATH includes /usr/local/cuda-8.0/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-8.0/lib64, or, add /usr/local/cuda-8.0/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-8.0/bin
Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-8.0/doc/pdf for detailed information on setting up CUDA.
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 361.00 is required for CUDA 8.0 functionality to work.
To install the driver using this installer, run the following command, replacing with the name of this run file:
sudo .run -silent -driver
Logfile is /tmp/cuda_install_9045.log
设置环境变量
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
添加系统变量修改到系统文件
sudo vi /etc/profile
在最后添加上面两句,然后保存。使立即生效
sudo ldconfig //环境变量立即生效
验证 cuda
c302@c302-dl:~/Downloads$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Sep__4_22:14:01_CDT_2016
Cuda compilation tools, release 8.0, V8.0.44
测试cuda的samples
cd ‘/home/zhou/NVIDIA_CUDA-8.0_Samples’
make //这里需要点时间
最后显示:
make[1]: Leaving directory `/home/c302/NVIDIA_CUDA-8.0_Samples/7_CUDALibraries/MersenneTwisterGP11213'
Finished building CUDA samples
cd 0_Simple/matrixMul
运行测试如下:
c302@c302-dl:~/NVIDIA_CUDA-8.0_Samples/0_Simple/matrixMul$ ./matrixMul
[Matrix Multiply Using CUDA] - Starting...
GPU Device 0: "GeForce GTX 1080" with compute capability 6.1
MatrixA(320,320), MatrixB(640,320)
Computing result using CUDA Kernel...
done
Performance= 1109.06 GFlop/s, Time= 0.118 msec, Size= 131072000 Ops, WorkgroupSize= 1024 threads/block
Checking computed result for correctness: Result = PASS
NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.
下一篇将会是安装cuDNN、tensorflow等lib
群星怎么让服务器稳定,DL服务器主机环境配置(ubuntu14.04+GTX1080+cuda8.0)解决桌面重复登录...相关推荐
- Windows上最全wsl2使用配置,包含基础配置、高级配置、开发工具、机器学习环境配置、机器人与自动驾驶环境配置(如Ros及百度的无人驾驶系统apollo)、服务器及Web开发环境配置等等
Windows上最全wsl2使用配置,包含基础配置.高级配置.开发工具.机器学习环境配置.机器人与自动驾驶环境配置(如Ros及百度的无人驾驶系统apollo).服务器及Web开发环境配置等等. 文章比 ...
- ubuntu linux编译环境搭建,Ubuntu14.04开发环境搭建
Ubuntu14.04开发环境搭建 嵌入式开发过程中很重要的一环节就是开发环境的搭建,开发环境搭建的好可以很好的提高开发效率.其中关键的一部就是挂载运行程序,对于程序的挂载运行需要借助NFS服务器,下 ...
- 深度学习主机环境配置: Ubuntu16.04+GeForce GTX 1080+TensorFlow
http://f.dataguru.cn/thread-660774-1-1.html 发表于 2016-7-20 09:04 | 只看该作者 |倒序浏览 |阅读模式 深度学习主机环境配置: Ubun ...
- 深度学习环境配置Win10+CUDA+cuDNN+Tensorflow2.0+PyTorch1.2+Python3.7.6
系统环境:Win10 Python版本:3.7.6 CUDA版本:10.0 cuDNN版本:7.6.5 Tensorflow-gpu版本:2.0.1 PyTorch版本:1.2.0 深度学习环境配置W ...
- 《从零开始搭建游戏服务器》Linux开发环境配置
前言: 之前的开发工作一直是在Windows开发环境下进行的,但是正真发布和外网运营势必要发布到Linux环境下,而且有很多服务端的工具对于Windows系统的兼容性并不是非常完善,就像常用的Dock ...
- 网吧电脑系统服务器,电脑网吧服务器主机如何配置
中国拥有世界上最大.最多.最强的网吧,中国拥有的网吧数量和PC机保有数量世界第一.下面带您了解一下电脑网吧服务器主机的相关知识. 网吧机器分为服务器和客户机两个部分,服务器一般配置较好,内有一个速度快 ...
- 虚拟机kali做成服务器,VMware kali虚拟机环境配置方法
1|0编译内核 (1)执行命令uname -r以查看内核版本. (2)执行命令apt-cache search linux-headers查看是否安装内核头文件. (3) 如果uname -r出现的 ...
- my SQL下载安装,环境配置,以及密码忘记的解决,以及navicat for mysql下载,安装,测试连接...
一.下载 在百度上搜索"mysql-5.6.24-winx64下载" 二.安装 选择安装路径,我的路径"C:\Soft\mysql-5.6.24-winx64" ...
- 【开发环境】 Ubuntu14.04 安装Skyeye 1.3.5过程
一. 前言 Skyeye是一个嵌入式开发板模拟软件,支持多种指令集.多种CPU.本文介绍Skyeye-1.3.5工具的安装.基于以下环境: 1. Ubuntu14.04 LTS (32位), 运行于V ...
最新文章
- 忙的连自己姓什么都不知道啦...
- RefFieldMethodDetails——查看类的域和方法
- 福昕风腾pdf导出为html,福昕风腾PDF套件快速指引.pdf
- C 语言:春节回家聚会,只有我没带对象!
- matlab语句跳转,matlab编程 跳转语句
- linux 命令大全_【Linux】命令目录大全
- 什么是数据标准化、中心化、归一化?SPSS又如何实现?
- pmp项目变更的流程图_【PMP】变更流程图与说明
- 恩典时代集团与深圳植慧科技产业签署合作备忘录
- 怎么在计算机里隐藏文件,怎么显示电脑隐藏文件?
- juqery addClass方法失效问题
- ArcGIS的符号选择器(Symbol Selector)为空的解决办法
- 《认知设计》-提升学习体验的艺术
- 大数据毕业设计_计算机专业如何才能更好的完成毕业设计呢?
- linux pppoe优化性能,基于Linux内核模式的PPPoE优化与实现.pdf
- 人工智能神经网络之父,神经网络是谁提出来的
- Tomcat下载及安装
- 郭明錤:苹果5G基带芯片研发失败 2023年新款iPhone仍用高通芯片
- 机器学习-降维算法(MDS算法)
- 2018财年微软游戏业务营收首超100亿美元 占公司总营收9.4%