[英]Can I let people use a different Tensorflow-gpu version above what they had installed with different CUDA dependencies?
I was trying to pack and release a project which uses tensorflow-gpu
. 我试图打包并发布一个使用
tensorflow-gpu
的项目。 Since my intention is to make the installation as easy as possible, I do not want to let the user compile tensorflow-gpu
from scratch so I decided to use pipenv
to install whatsoever version pip provides. 因为我的意图是使安装尽可能容易,所以我不想让用户从头开始编译
tensorflow-gpu
,所以我决定使用pipenv
来安装pip提供的任何版本。
I realized that although everything works in my original local version, I can not import tensorflow
in the virtualenv version. 我意识到尽管一切都可以在我的原始本地版本中运行,但是我无法在virtualenv版本中
import tensorflow
。
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
Although this seems to be easily fixable by changing local symlinks, that may break my local tensorflow
and is against the concept of virtualenv
and I will not have any idea on how people installed CUDA on their instances, so it doesn't seems to be promising for portability. 尽管通过更改本地符号链接似乎很容易解决此问题,但这可能会破坏我的本地张量
tensorflow
,并且违反了virtualenv
的概念,而且我对人们如何在其实例上安装CUDA也tensorflow
,因此这似乎没有什么希望便于携带。
What can I do to ensure that tensorflow-gpu
works when someone from internet get my project only with the guide of "install CUDA XX"? 当互联网上的某人仅在“安装CUDA XX”的指导下获得我的项目时,我该怎么做才能确保
tensorflow-gpu
正常工作? Should I fall back to tensorflow
to ensure compatibility, and let my user install tensorflow-gpu
manually? 我应该回到
tensorflow
以确保兼容性,并让我的用户手动安装tensorflow-gpu
吗?
Having a working tensorflow-gpu on a machine does involve a series of steps including installation of cuda and cudnn, the latter requiring an NVidia approval. 在机器上运行tensorflow-gpu确实需要一系列步骤,包括安装cuda和cudnn,后者需要获得NVidia的批准。 There are a lot of machines that would not even meet the required config for tensorflow-gpu, eg any machine that doesn't have a modern nvidia gpu.
许多机器甚至无法满足tensorflow-gpu所需的配置,例如,任何没有现代nvidia gpu的机器。 You may want to define the tensorflow-gpu requirement and leave it to the user to meet it, with appropriate pointers for guidance.
您可能需要定义tensorflow-gpu要求,并由用户来满足它,并带有适当的指导指针。 If the project can work acceptably on tensorflow-cpu, that would be a much easier fallback option.
如果项目可以在tensorflow-cpu上可接受地工作,那将是一个容易得多的后备选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.