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

bug: pi_cpp2py_export.so: Exec format error #97

Open
Brandl opened this issue Apr 16, 2023 · 0 comments
Open

bug: pi_cpp2py_export.so: Exec format error #97

Brandl opened this issue Apr 16, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Brandl
Copy link

Brandl commented Apr 16, 2023

Describe the bug

So I'm trying to get this running in a docker container and ran into the following error:

ctx = api.Context.from_file("/app/models/ggml-base.en.bin")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.11/site-packages/whispercpp/utils.py", line 144, in __getattr__
    self._module = self._load()
                   ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/whispercpp/utils.py", line 122, in _load
    module = importlib.import_module(self.__name__)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 676, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 573, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1233, in create_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
ImportError: Error loading shared library /usr/local/lib/python3.11/site-packages/whispercpp/api_cpp2py_export.so: Exec format error

I get the same error using >>> w = Whisper.from_pretrained("tiny.en")

To reproduce

So far my setup is relatively simple:

# Backend build stage
FROM python:3.11-alpine

WORKDIR /app

COPY requirements.txt /app/requirements.txt

RUN pip install --trusted-host pypi.python.org -r requirements.txt

# Copy the backend source files
COPY . /app

EXPOSE 8000

ENV NAME fastapi-app

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]

Expected behavior

No response

Environment

I install whispercpp==0.0.17 using pip (requirments.txt)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant