0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WSLにおけるCUDAのインストール 2

Last updated at Posted at 2024-12-12

この記事について

WSL環境下で、CUDAをインストールする方法その2(備忘録)
Tさん直伝

環境

Windows11
WSL2 Ubuntu

CUDAのホームページからCUDAをダウンロード

設定は次のようにする

スクリーンショット 2024-12-12 22.11.57.png

CUDAのホームページにあるコードを走らせる

sh
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-6

パスを通す

sh
export PATH=/usr/local/cuda-12.6/bin${PATH:+:${PATH}}
sh
export LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

nvcc --versionで存在を確認

sh
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Oct_29_23:50:19_PDT_2024
Cuda compilation tools, release 12.6, V12.6.85
Build cuda_12.6.r12.6/compiler.35059454_0

が出れば成功。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?