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

[Question]: how to create python wheel package with so files #10535

Open
zhaoyukoon opened this issue Jun 5, 2024 · 2 comments
Open

[Question]: how to create python wheel package with so files #10535

zhaoyukoon opened this issue Jun 5, 2024 · 2 comments

Comments

@zhaoyukoon
Copy link

Description

I try to build python wheel file from source code with command python setup.py sdist bdist_wheel. The final oneflow-0.9.0+cu117-cp38-cp38-linux_x86_64.whl file is only 51M size.

After i tried to pip install oneflow from this whl file, i run import oneflow and get following error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ygzhao/miniconda3/envs/flow_1/lib/python3.8/site-packages/oneflow/__init__.py", line 25, in <module>
    import oneflow._oneflow_internal
ImportError: libprotobuf.so.3.9.2.0: cannot open shared object file: No such file or directory

I checked this file is located in ./build/protobuf/src/protobuf/cmake/libprotobuf.so
My question is how to include all related so files into whl file.

Alternatives

No response

@zhaoyukoon
Copy link
Author

I tried to copy *.so to ./miniconda3/envs/flow_1/lib/python3.8/site-packages/oneflow/ and got following error:

>>> import oneflow
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ygzhao/miniconda3/envs/flow_1/lib/python3.8/site-packages/oneflow/__init__.py", line 25, in <module>
    import oneflow._oneflow_internal
ImportError: /home/ygzhao/miniconda3/envs/flow_1/lib/python3.8/site-packages/oneflow/liboneflow.so: undefined symbol: clGetPlatformIDs

@ShawnXuan
Copy link
Contributor

You can build wheel within https://hub.docker.com/r/oneflowinc/manylinux2014_x86_64_cuda11.7 and then use auditwheel repair.

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

2 participants