-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
add shared mkl lib in whl #3461
Conversation
2. fix path of bin files
This reverts commit fb61512.
Thanks~ |
我应该在本地检查哪几个方面呢? |
就是之前那两个issue,复现一下。应该是不能复现issue就对了。 主要是编译完之后, pip install whl,删掉本地的build目录(或者重命名)。 然后尝试 必须都不能出现
|
我在本地测了,出现:
import paddle和import py_paddle都是可以的。 |
不是这个code吧,感觉没生效呢。 要先重新编译,然后安装了吗? 或者pip uninstall paddlepaddle, 把输入list贴下? |
python/setup.py.in
Outdated
mkl_shared_libs='${MKL_SHARED_LIBS}' | ||
if mkl_shared_libs != '': | ||
paddle_rt_libs += mkl_shared_libs.split(';') | ||
print paddle_rt_libs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
34-39行可以合并:不需要print
paddle_rt_libs = [] if '${MKL_SHARED_LIBS}'== '' else '${MKL_SHARED_LIBS}'.split(';')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,thx。
是重新编译并安装的:
|
嗯,看到了,不过为什么你安装的都在 pip install的时候设置了prefix了吗? 在这个前提下,你以前执行paddle,也会出现 #3421 的问题吗? |
pip install的时候没有设置prefix。内网机器没有root权限,用jumbo来安装各种软件和python包,所以都在jumbo下面了。 |
#3421 是用docker来装的,用docker装的话,必须在有root权限的机器上。 |
我在猜想,你本机执行paddle 是不是也会遇到问题?因为他是安装在
|
teamcity里的错误,我也有,我删掉后就下载出错,后来是手动下载并 LD_LIBRARY_PATH和PATH见echo.log.txt |
我把路径 |
@@ -23,6 +23,21 @@ with open('@PADDLE_SOURCE_DIR@/python/requirements.txt') as f: | |||
if '${CMAKE_SYSTEM_PROCESSOR}' not in ['arm', 'armv7-a', 'aarch64']: | |||
setup_requires+=["opencv-python"] | |||
|
|||
# the prefix is sys.prefix which should always be usr | |||
paddle_bin_dir = 'local/opt/paddle/bin' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! This is the best way to fix installation dir issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in docker which will install under /usr/local/local/opt/paddle/bin/paddle_usage
if python's main path is under /usr/local
, should this be opt/paddle/bin
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about not in docker? Still like local/local
?
Or could you set --prefix=/usr when setup docker.
Because I thought outside docker, it should be default as /usr. I tried on my machine and just found that in @luotao1 's machine the path is still look right to me:
/home/luotao/.jumbo/local/opt/paddle/bin/paddle_merge_model
/home/luotao/.jumbo/local/opt/paddle/bin/paddle_pserver_main
/home/luotao/.jumbo/local/opt/paddle/bin/paddle_trainer
/home/luotao/.jumbo/local/opt/paddle/bin/paddle_usage
Her case is under /home/luotao/.jumbo
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought paddle
command is installed by scripts=['${PADDLE_BINARY_DIR}/paddle/scripts/paddle']
, so it's installed to where python installed at. When running pip install without setting --prefix
paddle
command will try to find binaries relatively, whether in docker or not.
In @luotao1 's case, is it working if binaries are installed under /home/luotao/.jumbo/opt/paddle/bin/
? If so, can using paddle_bin_dir = 'opt/paddle/bin'` solve all the cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- make install后,是在
/home/luotao/Paddle/build/opt/paddle/bin
下 - whl路径:
home/luotao/Paddle/build/opt/paddle/share/wheels/paddlepaddle-0.10.0-cp27-cp27mu-linux_x86_64.whl
- pip install后,是在
/home/luotao/.jumbo/local/opt/paddle/bin
下,所有python相关都在/home/luotao/.jumbo/lib/python2.7/site-packages/paddle
和/home/luotao/.jumbo/lib/python2.7/site-packages/py_paddle
下。
Thx, 如果是这样的话,那么也需要加一下LD_LIBRARY_PATH, 把
重新跑了一次就过了,感觉还是网络问题呢,或者是服务器的问题?
这个原来的单测里面,不包括测试使用吗?我感觉是不是有的? |
把/home/luotao/.jumbo/local/lib加入LD_LIBRARY_PATH,还是一样的问题 |
@luotao1 我能复现你的问题了。 Working on it. |
Done, @luotao1 you can have a try now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@tensor-tang I have a test in docker, it looks good!
Is the directory path /usr/local/local right? |
Thanks @QiJune This seems because docker will auto add So I recommend could we add --prefix='/usr' when docker? Then |
@QiJune |
@luotao1 will add unit test for this Thanks~ |
update new solution of #3401
This one should BOTH fix #3332 and fix #3213.
Please have a try on your local machine, any question feel feel to contact me .
And BTW, I found that below did not install the bin files into expected path
/usr/local/opt/paddle/bin
correctly. Then should cause the issue #3421.So I also fix it.