ubuntu20.04.2AI开发使用记录
基本信息
神舟z7-sp7s2
设备 | 参数 |
---|---|
CPU | intel i7 6700hq |
GPU | GTX 1060 6G |
MEMORY | 32G DDR4 |
DISK | nvme 1T sata3 1T |
基操
操作系统安装
- .不要联网,不要安装更新
- 选择安装第三方驱动
- 安装完成后修改软件源为阿里源后更新
开发环境安装
-
准备安装文件
-
安装开发环境
安装cuda和驱动
安装anaconda
// An highlighted block
var foo = 'bar';
-
测试显卡是否可用
import tensorflow as tf if tf.test.gpu_device_name(): print('Default GPU Device: {}'.format(tf.test.gpu_device_name())) import torch print(torch.cuda.is_available())
拨号上网
nmcli con edit type pppoe con-name 宽带名称
set pppoe.username 宽带账号
set pppoe.password 宽带密码
save
quit
# 删除连接
nmcli connection delete 宽带名称
键盘F1~F12无效
echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
sudo update-initramfs -u -k all
sudo reboot
进操
pycharm快捷键冲突
# 查询系统快捷键
gsettings list-keys org.gnome.desktop.wm.keybindings |awk '{print "echo " $0 "&& gsettings get org.gnome.desktop.wm.keybindings " $0}'|sh |grep -B 1 "要查看的快捷键"
# 禁用系统快捷键
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['disabled']"
系统休眠后无法唤醒
# 安装
sudo apt install laptop-mode-tools
sudo vim /etc/laptop-mode/laptop-mode.conf
# 修改
# ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED = 1
# ENABLE_LAPTOP_MODE_ON_AC = 1
# ENABLE_LAPTOP_MODE_ON_BATTERY = 1
sudo laptop_mode start
添加主机状态监控
sudo add-apt-repository ppa:fossfreedom/indicator-sysmonitor
sudo apt update
sudo apt install indicator-sysmonitor
修改自带文件管理器
sudo apt install exo-utils
exo-preferred-applications
anaconda图形化界面
anaconda-navigator
jupyter安装使用
pip install jupyter notebook
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user --skip-running-check
jupyter notebook
更换默认文件管理器
sudo apt install dconf-tools nemo
gsettings set org.gnome.desktop.background show-desktop-icons false
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search