I followed the directions on CUDA Toolkit 11.1 Downloads for WSL-Ubuntu Version 2.0.
- I chose the Installer Type 'runfile (local)'.
- I downloaded
wget https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda_11.1.0_455.23.05_linux.run
- Attempted to install with
sudo sh cuda_11.1.0_455.23.05_linux.run
I get the following errors:
/var/log/cuda-installer.log
:
[INFO]: Driver not installed.[INFO]: Checking compiler version...[INFO]: gcc location: /usr/bin/gcc[INFO]: gcc version: gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2) [INFO]: Initializing menu[INFO]: Setup complete[INFO]: Initializing writeable menu[INFO]: Components to install: [INFO]: Driver[INFO]: 455.23.05[INFO]: Executing NVIDIA-Linux-x86_64-455.23.05.run --ui=none --no-questions --accept-license --disable-nouveau --no-cc-version-check --install-libglvnd 2>&1[INFO]: Finished with code: 256[ERROR]: Install of driver component failed.[ERROR]: Install of 455.23.05 failed, quitting
/var/log/nvidia-installer.log
:
nvidia-installer log file '/var/log/nvidia-installer.log'creation time: Tue Oct 6 13:30:56 2020installer version: 455.23.05PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/binnvidia-installer command line: ./nvidia-installer --ui=none --no-questions --accept-license --disable-nouveau --no-cc-version-check --install-libglvndUsing built-in stream user interface-> Detected 8 CPUs online; setting concurrency level to 8.-> Installing NVIDIA driver version 455.23.05.WARNING: One or more modprobe configuration files to disable Nouveau are already present at: /usr/lib/modprobe.d/nvidia-installer-disable-nouveau.conf, /etc/modprobe.d/nvidia-installer-disable-nouveau.conf. Please be sure you have rebooted your system since these files were written. If you have rebooted, then Nouveau may be enabled for other reasons, such as being included in the system initial ramdisk or in your X configuration file. Please consult the NVIDIA driver README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.-> For some distributions, Nouveau can be disabled by adding a file in the modprobe configuration directory. Would you like nvidia-installer to attempt to create this modprobe file for you? (Answer: Yes)-> One or more modprobe configuration files to disable Nouveau have been written. For some distributions, this may be sufficient to disable Nouveau; other distributions may require modification of the initial ramdisk. Please reboot your system and attempt NVIDIA driver installation again. Note if you later wish to reenable Nouveau, you will need to delete these files: /usr/lib/modprobe.d/nvidia-installer-disable-nouveau.conf, /etc/modprobe.d/nvidia-installer-disable-nouveau.confWARNING: The file '/proc/sys/kernel/modprobe' is unavailable; the X server will use `/sbin/modprobe` as the path to the `modprobe` utility. This path differs from the one determined by `nvidia-installer`, /bin/kmod. Please verify that `/sbin/modprobe` works correctly or mount the /proc file system and verify that '/proc/sys/kernel/modprobe' reports the correct path.-> Performing CC sanity check with CC="/usr/bin/cc".-> Performing CC check.ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-source-path' command line option.ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
Next I tried:
git clone https://github.com/microsoft/WSL2-Linux-Kernel
- Run the installer again with kernel-source-path arg:
sudo sh cuda_11.1.0_455.23.05_linux.run --kernel-source-path=/mnt/c/repos/WSL2-Linux-Kernel
/var/log/nvidia-installer.log
has the additional information, but still failing:
-> Using the kernel source path '/mnt/c/repos/WSL2-Linux-Kernel' as specified by the '--kernel-source-path' commandline option.ERROR: Neither the '/include/linux/version.h' nor the '/include/generated/uapi/linux/version.h' kernel header file exists. The most likely reason for this is that the kernel source files in '/mnt/c/repos/WSL2-Linux-Kernel' have not been configured.ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
wslsys
:
WSL Version: 2Locale: en_USRelease Install Date: Sun Aug 2 13:00:51 PDT 2020Branch: vb_releaseBuild: 19041Full Build: 19041.1.amd64fre.vb_release.191206-1406Display Scaling: 1Windows Theme: lightWindows Uptime: 10d 1h 33mWSL Uptime: 0d 0h 14mWSL Release: Ubuntu 20.04.1 LTSWSL Kernel: Linux 4.4.0-19041-MicrosoftPackages Count: 715