2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

WSL2で、tensorflowを動かす(cudnn8のインストール方法)

Posted at

課題

WSL2環境に、wsl用のcudaをインストールした場合、cudnn8がレポジトリーに含まれておらず、インストールができません(2022/10/23現在)

このwsl用のレポジトリーに、libcudnn8*が無いんです。

次の方法でインストールできました。
もっと適切な方法があるのかもしれませんが、これでインストールできて、使えました。

ubuntu用のレポジトリーからパッケージを取得

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/libcudnn8-dev_8.0.5.39-1+cuda11.1_amd64.deb
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/libcudnn8_8.0.5.39-1+cuda11.1_amd64.deb

インストール

$ sudo apt install  ./libcudnn8-dev_8.0.5.39-1+cuda11.1_amd64.deb ./libcudn
n8_8.0.5.39-1+cuda11.1_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libcudnn8-dev' instead of './libcudnn8-dev_8.0.5.39-1+cuda11.1_amd64.deb'
Note, selecting 'libcudnn8' instead of './libcudnn8_8.0.5.39-1+cuda11.1_amd64.deb'
The following NEW packages will be installed:
  libcudnn8 libcudnn8-dev
0 upgraded, 2 newly installed, 0 to remove and 294 not upgraded.
Need to get 0 B/896 MB of archives.
After this operation, 4567 MB of additional disk space will be used.
Get:1 /home/masa/deeplearning4/4.2/gridworld/libcudnn8_8.0.5.39-1+cuda11.1_amd64.deb libcudnn8 amd64 8.0.5.39-1+cuda11.1 [506 MB]
Get:2 /home/masa/deeplearning4/4.2/gridworld/libcudnn8-dev_8.0.5.39-1+cuda11.1_amd64.deb libcudnn8-dev amd64 8.0.5.39-1+cuda11.1 [389 MB]
Selecting previously unselected package libcudnn8.
(Reading database ... 77559 files and directories currently installed.)
Preparing to unpack .../libcudnn8_8.0.5.39-1+cuda11.1_amd64.deb ...
Unpacking libcudnn8 (8.0.5.39-1+cuda11.1) ...
Selecting previously unselected package libcudnn8-dev.
Preparing to unpack .../libcudnn8-dev_8.0.5.39-1+cuda11.1_amd64.deb ...
Unpacking libcudnn8-dev (8.0.5.39-1+cuda11.1) ...
Setting up libcudnn8 (8.0.5.39-1+cuda11.1) ...
Setting up libcudnn8-dev (8.0.5.39-1+cuda11.1) ...
update-alternatives: using /usr/include/x86_64-linux-gnu/cudnn_v8.h to provide /usr/include/cudnn.h (libcudnn) in auto mode
2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?