1:配置網絡端口22供ssh用
sudo apt-get install openssh-server
sudo apt-get install ufw
sudo ufw enable
sudo ufw allow 22
2:pip源配置
(1):在用戶的家目錄下面創建名為.pip文件夾
(2):在創建好的.pip文件夾中創建名為pip.conf的文件
(3):在pip.conf文件中輸入以下內容,ok!!!
[global]
timeout = 6000
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com
3: 顯卡驅動安裝
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-cache search nvidia
sudo ubuntu-drivers devices 找到推薦的驅動(recommended)
sudo apt-get install nvidia-driver-510
需要重啟,nvidia-smi才生效
4:cuda11.1安裝:
wget https://developer.download.nvidia.com/compute/cuda/11.6.1/local_installers/cuda_11.6.1_510.47.03_linux.run
sudo sh cuda_11.6.1_510.47.03_linux.run
5:cudnn安裝
去官網下載:
解壓
tar -xzvf cudnn-11.1-linux-x64-v8.0.4.30.tgz
sudo cp cuda/include/* /usr/local/cuda/include/
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64/
sudo chmod a+r /usr/local/cuda/include/cudnn.h
sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
6:安裝pytorch1.8.2(LTS)
pip install torch==1.8.2+cu111 torchvision==0.9.2+cu111 torchaudio==0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
7: 查看電源輸出功率
sudo dmidecode | grep Power
8: 磁盤信息
df -lh
9: 在Linux中添加新硬盤后,分區并裝入硬盤
http://www.pc-fly.com/a/dianqi/article-315770-1.html
https://blog.csdn.net/woailyoo0000/article/details/86485666
使用 df -h 查看電腦硬盤信息(并沒有我們添加的硬盤)
使用 fdisk -l 查看電腦所有磁盤信息包括未加載磁盤
使用 lsblk 檢查哪塊磁盤為加載和分區
用 fdisk 對這塊硬盤分區(當硬盤小于等于2T時,用fdisk,大于2T時,用parted)