V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
ykk
V2EX  ›  Python

如何打包 windows 下的 Python +cuda+tensorflow 程序成为 exe?

  •  2
     
  •   ykk · 2021-07-16 16:15:29 +08:00 · 1792 次点击
    这是一个创建于 986 天前的主题,其中的信息可能已经有所发展或是发生改变。
    这块确实是知识盲区,是用 pyinstaller 做的还是 VS 做的呢?

    需要打包完成后在没有 cuda 环境的任意一台有 GPU 的 windows 电脑上运行,目前看到别人打包的程序中有大量的 dll 文件,同时也存在原始 python 代码
    5 条回复    2021-07-16 18:52:19 +08:00
    tan90du2
        1
    tan90du2  
       2021-07-16 17:58:00 +08:00
    cuda 是个显卡的驱动程序,和操作系统版本、显卡可能都有关系,怎么能打包到你的应用里在所有电脑上运行?
    3dwelcome
        2
    3dwelcome  
       2021-07-16 18:02:58 +08:00
    @tan90du2 可以直接发布 cuda 二进制的 dll, 只要是 N 卡并且驱动版本不旧,就能直接用。

    waifu2x-caffe 就是这样做的。
    zxCoder
        3
    zxCoder  
       2021-07-16 18:13:14 +08:00 via Android
    这么奇怪的需求
    ykk
        4
    ykk  
    OP
       2021-07-16 18:22:57 +08:00
    @3dwelcome 是的 请问如何发布 cuda 的 dll,是用 VS 吗?
    7075
        5
    7075  
       2021-07-16 18:52:19 +08:00
    node + tf.js 更现实点?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   959 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 20:37 · PVG 04:37 · LAX 13:37 · JFK 16:37
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.