Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support static link for almost dependency libraries for easy installation. #259

Closed
backyes opened this issue Oct 26, 2016 · 3 comments
Closed
Assignees
Milestone

Comments

@backyes
Copy link
Contributor

backyes commented Oct 26, 2016

  • enable CMAKE support static link for most libraries, except core GLIBC.
  • try to enable full static link for most platform
@backyes
Copy link
Contributor Author

backyes commented Nov 7, 2016

从用户角度来理解,静态编译技术上可能包含几个层面:

  • 除了核心GCC运行时环境仍然动态加载外,其他所有依赖库采用静态链接。(方案1)
  • 全部采用静态链接。(方案2)

对开源用户而言,技术上存在以下问题:

  • 由于开源用户运行时环境多样,可能出现运行时环境不兼容导致静态编译的二进制包运行失败。绝大部分可以通过升级gcc运行时环境来解决。对于不同平台、不同linux发行版,工程上仍然需要大量测试,确保静态包能成功运行。
  • 由于Paddle依赖python。Paddle可以静态连接python库解决一部分问题,但是由于Paddle的py_paddle、模型相关python库需要安装到python解释环境中,因此无法完全做到在不干扰用户python环境下,安装Paddle。如果Paddle不彻底采用自带的python,用户潜在仍然会出现python相关的问题,因此不能彻底解决安装问题。
  • 由于Paddle包含若干数学计算库,所以全部静态打包发布,也存在法律风险。从源码编译或者动态加载,允许用户使用自己私有商用和开源的数序库。

所以, 为了优化开源用户安装体验,建议开源用户:

对于内部用户,已经产出一键编译工具:

  • 对除gcc运行时库之外的所有第三方库均采用静态编译
  • 已实现二进制包发布

综合来看,对开源初级用户,

  • 针对不同发行版操作系统,发布更加多的针对性安装包,是比较优的选择
  • 对源码安装做更加多的解读,降低源码安装的难度

@reyoung @emailweixu @wangkuiyi @hedaoyuan 怎么看这个问题?

@backyes backyes closed this as completed Nov 7, 2016
@backyes backyes reopened this Nov 7, 2016
@reyoung
Copy link
Collaborator

reyoung commented Nov 7, 2016

这个事情,我想有百度内和社区两个方面,

一个是百度公司内的问题,我们已经使用用纯静态二进制分发了Paddle。请确保用户都知道了静态二进制的存在,特别是,我们应该修改内网的一些连接到静态的二进制包上。或者维护一个release页面,让用户能够找到二进制的下载地址。

另一个是,对社区来说,我也觉得使用Docker或者安装包就够了。

@wangkuiyi
Copy link
Collaborator

我赞同发布docker image即可。可以close这个issue。

gglin001 added a commit to graphcore/Paddle-fork that referenced this issue Dec 8, 2021
wangxicoding pushed a commit to wangxicoding/Paddle that referenced this issue Dec 9, 2021
AnnaTrainingG pushed a commit to AnnaTrainingG/Paddle that referenced this issue Sep 19, 2022
zmxdream pushed a commit to zmxdream/Paddle that referenced this issue Apr 22, 2023
danleifeng pushed a commit to danleifeng/Paddle that referenced this issue Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants