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

How to create a portable wheel? #320

Open
srdecny opened this issue Feb 23, 2024 · 1 comment
Open

How to create a portable wheel? #320

srdecny opened this issue Feb 23, 2024 · 1 comment

Comments

@srdecny
Copy link

srdecny commented Feb 23, 2024

I created a pykaldi wheel by following the instructions at https://github.com/pykaldi/pykaldi?tab=readme-ov-file#step-2-install-dependencies which results in a .whl file. The wheel works fine when installed on the machine where kaldi was compiled. However, when installing the wheel on another machine (such as a docker container), importing kaldi no longer works:

root@88d7b7ab862f:/code# python3 -c "import kaldi"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.12/dist-packages/kaldi/__init__.py", line 14, in <module>
    from . import base
  File "/usr/local/lib/python3.12/dist-packages/kaldi/base/__init__.py", line 1, in <module>
    from ._kaldi_error import *
ImportError: libkaldi-base.so: cannot open shared object file: No such file or directory

This is because the wheel doesn't contain the libkaldi-base.so file, which is located at kaldi/src/lib/libkaldi-base.so in the kaldi repository.

Is there a way how to include these .so files and other dynamically linked dependencies into the wheel to avoid these issues?

@srdecny
Copy link
Author

srdecny commented Feb 23, 2024

#261 (comment) is relevant here

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

1 participant