Nvidia Cudatoolkit和Conda Cudatoolkit

编程入门 行业动态 更新时间:2024-10-07 18:25:55
本文介绍了Nvidia Cudatoolkit和Conda Cudatoolkit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

直到现在,我一直在使用 Tensorflow-GPU ,方法是使用 pip 以及 Nvidia网站上的Cuda相关软件和Nvidia软件/驱动程序进行安装强>.最近,我发现使用conda install tensorflow-gpu还会安装 cudatoolkit 和 cudnn .

Till date, I have been using Tensorflow-GPU by installing it using pip and the Cuda related software and Nvidia softwares/drivers from Nvidia's website. Recently, I found that using conda install tensorflow-gpu also installs cudatoolkit and cudnn.

那么,这些(conda提供的)与我从Nvidia网站下载的那些有何不同?

So, how are these(the ones provided by conda) different from the ones that I downloaded from Nvidia's website?

在我的第一个(先前)环境中,conda list显示我只安装了TensorFlow(来自PyPi),没有安装cudnn/cudatoolkit,但仍然一切正常.

In my first (previous) environment, conda list showed that I have installed only TensorFlow(from PyPi) and no cudnn/cudatoolkit, but still everything worked.

此外,在我运行conda install tensorflow-gpu的新环境中,conda list显示我已安装 tensorflow-gpu 以及 cudatoolkit 和 cudnn (由 Anaconda ).而且在这种环境下,一切都可以正常工作.

Also, in a new environment in which I ran conda install tensorflow-gpu, conda list showed me tensorflow-gpu has been installed along with cudatoolkit and cudnn by Anaconda. And in this environment also, everything worked fine.

这是否意味着,如果我使用pip安装TensorFlow,仅需要 从Nvidia网站下载和安装Cuda?

So does this mean, that downloading and installing Cuda from Nvidia's website is only necessary if I use pip to install TensorFlow?

推荐答案

如果使用anaconda安装tensorflow-gpu,是的,它将在与tensorflow-gpu相同的conda环境中为您安装cuda和cudnn.您自己需要安装的是最新的nvidia驱动程序(以便它可以与最新的CUDA级别以及您使用的所有旧CUDA级别一起使用.)

If using anaconda to install tensorflow-gpu, yes it will install cuda and cudnn for you in same conda environment as tensorflow-gpu. All you need to install yourself is the latest nvidia-driver (so that it works with the latest CUDA level and all older CUDA levels you use.)

与pip install tensorflow-gpu方法相比,它具有许多优点:

This has many advantages over the pip install tensorflow-gpu method:

  • Anaconda将始终安装TensorFlow代码被编译为使用的CUDA和CuDNN版本.
  • 您可以拥有具有不同级别的TensorFlow,CUDA和CuDNN的多个conda环境,只需使用conda activate在它们之间进行切换即可.
  • 您不必手动在系统级安装CUDA和cuDNN.
  • 与pip install tensorflow-gpu相比,缺点是在Anaconda能够更新conda配方并发布其最新TensorFlow版本的构建之前,将最新版本的tensorflow添加到pypi.

    The disadvantage when compared to pip install tensorflow-gpu, is the latest version of tensorflow is added to pypi weeks before Anaconda is able to update the conda recipe and publish their builds of the latest TensorFlow version.

    更多推荐

    Nvidia Cudatoolkit和Conda Cudatoolkit

    本文发布于:2023-06-02 01:01:25,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/430986.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:Nvidia   Cudatoolkit   Conda

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!