CUDA 与 Nvidia 440 驱动程序不兼容吗?

CUDA 与 Nvidia 440 驱动程序不兼容吗?

今天我将 Nvidia 驱动程序升级到 440 版(从 430 版开始)。然后我可能做错了什么,卸载了 CUDA(或者它被系统删除了,我不太记得了)。

我通过运行安装了 cuda-toolkit sudo apt install nvidia-cuda-toolkit,但$CUDA目录几乎是空的:它只包含一个samples目录,其中包含预编译的示例。该目录中没有源代码、没有文档、没有库等,就像以前一样。

我按照以下说明进行操作https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=deblocal,但是当我运行时sudo apt install cuda,我得到了以下结果:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libnvidia-common-440
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  cuda-command-line-tools-10-1 cuda-compiler-10-1 cuda-cudart-10-1
  cuda-cudart-dev-10-1 cuda-cufft-10-1 cuda-cufft-dev-10-1 cuda-cuobjdump-10-1
  cuda-cupti-10-1 cuda-curand-10-1 cuda-curand-dev-10-1 cuda-cusolver-10-1
  cuda-cusolver-dev-10-1 cuda-cusparse-10-1 cuda-cusparse-dev-10-1
  cuda-demo-suite-10-1 cuda-documentation-10-1 cuda-driver-dev-10-1
  cuda-drivers cuda-gdb-10-1 cuda-gpu-library-advisor-10-1 cuda-libraries-10-1
  cuda-libraries-dev-10-1 cuda-license-10-1 cuda-memcheck-10-1
  cuda-misc-headers-10-1 cuda-npp-10-1 cuda-npp-dev-10-1 cuda-nsight-10-1
  cuda-nsight-compute-10-1 cuda-nsight-systems-10-1 cuda-nvcc-10-1
  cuda-nvdisasm-10-1 cuda-nvgraph-10-1 cuda-nvgraph-dev-10-1 cuda-nvjpeg-10-1
  cuda-nvjpeg-dev-10-1 cuda-nvml-dev-10-1 cuda-nvprof-10-1 cuda-nvprune-10-1
  cuda-nvrtc-10-1 cuda-nvrtc-dev-10-1 cuda-nvtx-10-1 cuda-nvvp-10-1
  cuda-runtime-10-1 cuda-samples-10-1 cuda-sanitizer-api-10-1
  cuda-toolkit-10-1 cuda-tools-10-1 cuda-visual-tools-10-1 libcublas-dev
  libcublas10 libnvidia-cfg1-418 libnvidia-common-418 libnvidia-compute-418
  libnvidia-decode-418 libnvidia-encode-418 libnvidia-fbc1-418
  libnvidia-gl-418 libnvidia-ifr1-418 libxmu-dev libxmu-headers
  nsight-compute-2019.4.0 nsight-systems-2019.3.7 nvidia-compute-utils-418
  nvidia-dkms-418 nvidia-driver-418 nvidia-kernel-common-418
  nvidia-kernel-source-418 nvidia-modprobe nvidia-settings nvidia-utils-418
  xserver-xorg-video-nvidia-418
Recommended packages:
  libnvidia-compute-418:i386 libnvidia-decode-418:i386
  libnvidia-encode-418:i386 libnvidia-ifr1-418:i386 libnvidia-fbc1-418:i386
  libnvidia-gl-418:i386
The following packages will be REMOVED:
  libnvidia-cfg1-440 libnvidia-compute-440 libnvidia-compute-440:i386
  libnvidia-decode-440 libnvidia-decode-440:i386 libnvidia-encode-440
  libnvidia-encode-440:i386 libnvidia-fbc1-440 libnvidia-fbc1-440:i386
  libnvidia-gl-440 libnvidia-gl-440:i386 libnvidia-ifr1-440
  libnvidia-ifr1-440:i386 nvidia-compute-utils-440 nvidia-dkms-440
  nvidia-driver-440 nvidia-kernel-common-440 nvidia-kernel-source-440
  nvidia-utils-440 xserver-xorg-video-nvidia-440
The following NEW packages will be installed:
  cuda-10-1 cuda-command-line-tools-10-1 cuda-compiler-10-1 cuda-cudart-10-1
  cuda-cudart-dev-10-1 cuda-cufft-10-1 cuda-cufft-dev-10-1 cuda-cuobjdump-10-1
  cuda-cupti-10-1 cuda-curand-10-1 cuda-curand-dev-10-1 cuda-cusolver-10-1
  cuda-cusolver-dev-10-1 cuda-cusparse-10-1 cuda-cusparse-dev-10-1
  cuda-demo-suite-10-1 cuda-documentation-10-1 cuda-driver-dev-10-1
  cuda-drivers cuda-gdb-10-1 cuda-gpu-library-advisor-10-1 cuda-libraries-10-1
  cuda-libraries-dev-10-1 cuda-license-10-1 cuda-memcheck-10-1
  cuda-misc-headers-10-1 cuda-npp-10-1 cuda-npp-dev-10-1 cuda-nsight-10-1
  cuda-nsight-compute-10-1 cuda-nsight-systems-10-1 cuda-nvcc-10-1
  cuda-nvdisasm-10-1 cuda-nvgraph-10-1 cuda-nvgraph-dev-10-1 cuda-nvjpeg-10-1
  cuda-nvjpeg-dev-10-1 cuda-nvml-dev-10-1 cuda-nvprof-10-1 cuda-nvprune-10-1
  cuda-nvrtc-10-1 cuda-nvrtc-dev-10-1 cuda-nvtx-10-1 cuda-nvvp-10-1
  cuda-runtime-10-1 cuda-samples-10-1 cuda-sanitizer-api-10-1
  cuda-toolkit-10-1 cuda-tools-10-1 cuda-visual-tools-10-1 libcublas-dev
  libcublas10 libnvidia-cfg1-418 libnvidia-common-418 libnvidia-compute-418
  libnvidia-decode-418 libnvidia-encode-418 libnvidia-fbc1-418
  libnvidia-gl-418 libnvidia-ifr1-418 libxmu-dev libxmu-headers
  nsight-compute-2019.4.0 nsight-systems-2019.3.7 nvidia-compute-utils-418
  nvidia-dkms-418 nvidia-driver-418 nvidia-kernel-common-418
  nvidia-kernel-source-418 nvidia-modprobe nvidia-utils-418
  xserver-xorg-video-nvidia-418
The following packages will be upgraded:
  nvidia-settings

答案1

您的 nvidia 驱动程序将支持多个 Cuda 版本:
使用“nvidia-smi”查找您可以支持的“最高”cuda 版本。

您可以在系统上安装多个 cuda 版本(从 nvidia 下载并安装),但在安装过程中,请不要(取消选中)旧 Cuda 版本的 Nvidia 驱动程序。

例如:运行 nvidia-smi,您会看到它最高可支持 10.2 Cuda。

您可以通过从 Nvidia 下载/访问将 cuda 9 或 10.1、10.0 安装到 /usr/local。

要使用您选择的 Cuda 版本,请修改您的 $PATH 和 $LD_LIBRARY_PATH。

我将指向 (cuda、LD_LIBRARY_PATH、PATH) 的搜索和此博客文章以获取更多信息:

https://marmelab.com/blog/2018/03/21/using-nvidia-gpu-within-docker-container.html

向所有在我之前的人致敬。

相关内容