diff --git a/install-nvidia-smi.md b/install-nvidia-smi.md new file mode 100644 index 0000000..42829e7 --- /dev/null +++ b/install-nvidia-smi.md @@ -0,0 +1,50 @@ +```shell +wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-ubuntu2404.pin +``` + +```shell +sudo mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600 +``` + +```shell +wget https://developer.download.nvidia.com/compute/cuda/12.5.1/local_installers/cuda-repo-ubuntu2404-12-5-local_12.5.1-555.42.06-1_amd64.deb +``` + +```shell +sudo dpkg -i cuda-repo-ubuntu2404-12-5-local_12.5.1-555.42.06-1_amd64.deb +``` + +```shell +sudo cp /var/cuda-repo-ubuntu2404-12-5-local/cuda-*-keyring.gpg /usr/share/keyrings/ +``` + +```shell +sudo apt-get update +``` + +```shell +sudo apt-get -y install cuda-toolkit-12-5 +``` +重启 + +```shell +nano ~/.bashrc +``` + +```shell +# NVIDIA CUDA Toolkit Environment Variables +export PATH=/usr/local/cuda-12.5/bin${PATH:+:${PATH}} +export LD_LIBRARY_PATH=/usr/local/cuda-12.5/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} +``` + +```shell +source ~/.bashrc +``` + +```shell +nvidia-smi +``` + +```shell +nvcc -V +``` \ No newline at end of file