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

Wrong torchaudio version is installed into docker images #4089

Closed
1 task done
tstadel opened this issue Feb 7, 2023 · 2 comments · Fixed by #4102
Closed
1 task done

Wrong torchaudio version is installed into docker images #4089

tstadel opened this issue Feb 7, 2023 · 2 comments · Fixed by #4102
Assignees
Labels
topic:docker type:bug Something isn't working

Comments

@tstadel
Copy link
Member

tstadel commented Feb 7, 2023

Describe the bug
When using torchaudio in docker image deepset/haystack:base-gpu-v1.13.1, we get the following error:

Error message

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/venv/lib/python3.10/site-packages/torchaudio/__init__.py", line 1, in <module>
    from torchaudio import (  # noqa: F401
  File "/opt/venv/lib/python3.10/site-packages/torchaudio/_extension.py", line 136, in <module>
    _check_cuda_version()
  File "/opt/venv/lib/python3.10/site-packages/torchaudio/_extension.py", line 128, in _check_cuda_version
    raise RuntimeError(
RuntimeError: Detected that PyTorch and TorchAudio were compiled with different CUDA versions. PyTorch has CUDA version 11.6 whereas TorchAudio has CUDA version 11.7. Please install the TorchAudio version that matches your PyTorch version.

Expected behavior
Image uses the correct torchaudio version.

Additional context
Add any other context about the problem here, like document types / preprocessing steps / settings of reader etc.

To Reproduce

import torchaudio

FAQ Check

@tstadel
Copy link
Member Author

tstadel commented Feb 7, 2023

I seems to be solved by adding --extra-index-url https://download.pytorch.org/whl/cu116 to the torchaudio install command in the Dockerfile.

@sjrl
Copy link
Contributor

sjrl commented Feb 8, 2023

I think this would be better solved by combining these two lines

pip install --no-cache-dir -U torchaudio && \
pip install --no-cache-dir .${haystack_extras} && \

in our docker file into one pip install statement. Or change the order, so we only install pytorch audio after pytorch has already been installed through the haystack_extras.

I believe pip handles these dependency conflicts better when everything is installed together.

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

Successfully merging a pull request may close this issue.

3 participants