./NVIDIA-Linux-x86_64-560.35.03.run
# NVIDIA 驱动程序由于是在容器内部安装,因此不需要安装 kernel 模块,在安装驱动程序时增加 --no-kernel-module# 一路yes、ok就行# 查看是否安装成功
nvidia-smi
# 如果成功会输出类似如下信息
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.35.03 Driver Version: 560.35.03 CUDA Version: 12.6||-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC || Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |||| MIG M. ||=========================================+========================+======================||0 Tesla V100S-PCIE-32GB Off | 00000000:AF:00.0 Off |0|| N/A 32C P0 25W / 250W | 1MiB / 32768MiB |0% Default |||| N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: || GPU GI CI PID Type Process name GPU Memory || ID ID Usage ||=========================================================================================|| No running processes found |
+-----------------------------------------------------------------------------------------+
安装cuda工具包
./cuda_12.6.0_560.28.03_linux.run
# 需要等一会后输入accept才继续# 出现选项,回车取消选择Driver,然后选择install开始安装# 安装成功后会出现如下信息============ Summary ============
Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-12.6/
Please make sure that
- PATH includes /usr/local/cuda-12.6/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-12.6/lib64, or, add /usr/local/cuda-12.6/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-12.6/bin
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 560.00 is required for CUDA 12.6 functionality to work.
To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file:
sudo<CudaInstaller>.run --silent--driver