개요
Windows에 NVIDIA Driver가 설치된 상태에서 WSL 내에 NVIDIA CUDA Toolkit을 설치한다.
NVIDIA CUDA Toolkit 설치
apt-key del 7fa2af80 && \ wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin && \ mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600 && \ wget https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda-repo-wsl-ubuntu-11-7-local_11.7.0-1_amd64.deb && \ dpkg -i cuda-repo-wsl-ubuntu-11-7-local_11.7.0-1_amd64.deb && \ cp /var/cuda-repo-wsl-ubuntu-11-7-local/cuda-*-keyring.gpg /usr/share/keyrings/ && \ apt update && apt install -y cuda && \ nvidia-smi