在 WSL2 上安装 Tensorflow-GPU [英] Install Tensorflow-GPU on WSL2
问题描述
有没有人用 NVIDIA GPU 在 WSL2 上成功安装过 Tensorflow-GPU?我在 WSL2 上安装了 Ubuntu 18.04,但正在努力安装 NVIDIA 驱动程序.当我迷路时,任何帮助将不胜感激.
Has anyone successfully installed Tensorflow-GPU on WSL2 with NVIDIA GPUs? I have Ubuntu 18.04 on WSL2, but am struggling to get NVIDIA drivers installed. Any help would be appreciated as I'm lost.
推荐答案
由于以下文章,我可以确认我能够在不需要 WSL2 上的 Docker 的情况下完成这项工作:
I can confirm I am able to get this working without the need for Docker on WSL2 thanks to the following article:
https://qiita.com/Navier/items/cf551908bae707db4258
请务必更新到驱动程序版本 460.15
,而不是 CUDA 文档中列出的 455.41
.
Be sure to update to driver version 460.15
, not 455.41
as listed in the CUDA documentation.
注意,这不适用于 TCC 模式(仅限 WDDM)的卡.另外,请确保将文件放在 Linux 文件系统上(即不要放在挂载驱动器上,例如 /mnt/c/
).Linux 文件系统上的性能明显更快(这与 WSL 1 与 WSL 2 的实现差异有关;请参阅 1, 2 和 3).
Note, this does not work with the card in TCC mode (only WDDM). Also, be sure to place your files on the Linux file system (i.e. not on a mount drive, like /mnt/c/
). Performance is significantly faster on the Linux file system (this has to do with the difference in implementation of WSL 1 vs. WSL 2; see 1, 2, and 3).
注意:另见 Keras/Tensorflow 中的类生成器(继承序列)线程安全吗?
这篇关于在 WSL2 上安装 Tensorflow-GPU的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!