1. 首先确定是否有GPU驱动
  1. 其次安装必须的CUDA安装包
  1. 下载好后执行
  1. 安装好后修改环境变量
`vim ~/.bashrc
export PATH=/usr/local/cuda-12.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.1/lib64:$LD_LIBRARY_PATH
`
 vim /home/xxx/.bashrc
export PATH=/usr/local/cuda-12.1/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.1/lib64:$LD_LIBRARY_PATH
03-23 09:09