Ubuntu installation and configuration nvidia driver, cuda, pytorch

  1. Download these three packages first:
    cuda 11.1
    pytorch cu111 py38
    nvidia driver

  2. Install the nVidia driver first. You can also do
    this https://blog.csdn.net/qq_41481731/article/details/86640170 (remember to add execution permissions)
    sudo ./NVIDIA-Linux-x86_64-470.86.run

  3. Install cuda
    directly like this ./cuda_11.1.0_455.23.05_linux.run(remember to add execution permissions)
    and then configure the environment variables as required:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.1/lib64
export PATH=$PATH:/usr/local/cuda-11.1/bin
export CUDA_HOME=$CUDA_HOME:/usr/local/cuda-11.1
  1. Install pytorch
    pip install ./torch-1.8.2+cu111-cp38-cp38-linux_x86_64.whl

おすすめ

転載: blog.csdn.net/Defiler_Lee/article/details/121283469