(1)若 CUDA 被正确地安装,下面的指令可以在命令窗口中打印出 GPU 的信息。
python -c “import tensorflow”
(2)使用winscp给Ubuntu传输文件报错permission denied:这个原因是权限不够,选择使用root账户登录winscp。步骤如下:
1. ubuntu 服务器默认的root账号是没有激活的,需要用初装的用户账号给root设置管理密码:
sudo passwd root //用sudo修改root帐户
Password: //输入密码
Enter new UNIX password: //提示输入新的root帐户密码
Retype new UNIX password: //再输入一次确认密码
修改成功之后你就可以使用root账号了,可以使用su root 命令切换到root。
2. 修改ssh配置文件:
/etc/ssh/sshd_config 修改该配置文件:
# Authentication:
LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes
#将 PermitRootLogin without-password 修改为 PermitRootLogin yes,如下:
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
重启ssh服务:sudo service ssh restart
可以成功登陆了。
(3)Ubuntu更新源
国内速度较快源的网址:
清华TUNA镜像源:https://mirrors.tuna.tsinghua.edu.cn/
中科大USTC镜像源:https://mirrors.ustc.edu.cn/
网易163源:http://mirrors.163.com/ (全称网易开源镜像站,前身cn99源)
搜狐源,其中ubuntu 源是在中国的官方源:http://mirrors.sohu.com/
北京交通大学源:http://mirror.bjtu.edu.cn/cn/
(4)获取显卡型号:lspci -vnn | grep VGA -A 12或者英伟达lspci | grep -i nvidia
(5)安装CUDA时一定使用runfile文件,这样可以进行选择。不再选择安装驱动