NVIDIA驅動安裝
- 檢查驅動資訊
last reboot
uname -r
cat /var/log/apt/history.log
nvidia-smi
ll /usr/src/
lsmod |grep nvidia
lspci |grep -i nvidia
dmesg -i |grep nvidia
dmesg |grep -i nvidia
dmesg |grep -i nvrm
dpkg --get-selections | grep linux-image
- 檢視載入核心版本
zgrep -ai BOOT_IMAGE /var/log/syslog*
cat /boot/grub/grub.cfg |grep 4.15
cat /etc/default/grub
- 解除安裝NVIDIA驅動
sudo apt-get --purge remove nvidia*
- 解除安裝cuda
./usr/local/cuda/bin/cuda-uninstaller
- 安裝NVIDIA及CUDA
apt-get update
sudo apt-get install nvidia-driver-470
wget https://developer.download.nvidia.com/compute/cuda/11.4.4/local_installers/cuda_11.4.4_470.82.01_linux.run
chmod +x cuda_11.4.4_470.82.01_linux.run
./cuda_11.4.4_470.82.01_linux.run --toolkit --samples --silent
nvidia-smi -pm 1
nvidia-smi
/usr/local/cuda/bin/nvcc -V
環境變數
export PATH=/usr/local/cuda-11.4/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.4/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
CONDA環境安裝
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2022.05-Linux-x86_64.sh
bash Anaconda3-2022.05-Linux-x86_64.sh
conda env create -f deep3d_env.yaml
conda env list
conda config --show-sources
conda config --remove channels https://anaconda.org/brown-data-science/gcc/5.4.0/download
conda config --add channels https://mirror.sjtu.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/main
conda config --add channels defaults
環境變數設定
vim /root/.bashrc
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/data/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/data/anaconda3/etc/profile.d/conda.sh" ]; then
. "/data/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/data/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup