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]: Running latest docker container fails to find Python extension: libtorch_cuda_cu.so #8348

Closed
radiantone opened this issue Nov 13, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@radiantone
Copy link

radiantone commented Nov 13, 2023

Short description of current behavior

Failed to load image Python extension: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory

Video or screenshots

(venv) darren@phoenix:~/PycharmProjects/pyfi$ docker compose up mindsdb
[+] Running 2/0
⠿ Container postgresdb Running 0.0s
⠿ Container mindsdb Recreated 0.1s
Attaching to mindsdb
mindsdb | [nltk_data] Downloading package punkt to /root/nltk_data...
mindsdb | [nltk_data] Unzipping tokenizers/punkt.zip.
mindsdb | /opt/conda/lib/python3.9/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory
mindsdb | warn(f"Failed to load image Python extension: {e}")
mindsdb |
mindsdb | ✓ telemetry enabled
mindsdb |
mindsdb | Applying database migrations:

Expected behavior

To load Python extension: libtorch_cuda_cu.so

How to reproduce the error

Run the container mindsdb/mindsdb:latest

Anything else?

No response

@radiantone radiantone added the bug Something isn't working label Nov 13, 2023
@legendkartik45
Copy link

Can u pls assign this issue to me, will take a look

@radiantone
Copy link
Author

@legendkartik45 The admins will have to do it, as I cannot.

@chandrevdw31
Copy link
Contributor

@radiantone I think you will still be able to access the gui via the url http://127.0.0.1:47334

@bilalcorbacioglu
Copy link

I'm having the same problem. I have the latest version of `mindsdb/mindsdb'.

a@A-MacBook-Pro ~ % docker run -p 47334:47334 -p 47335:47335 mindsdb/mindsdb


2023-11-21 11:56:01,474 - INFO - generated new fontManager
/opt/conda/lib/python3.9/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory
  warn(f"Failed to load image Python extension: {e}")
/opt/conda/lib/python3.9/site-packages/flask_restx/namespace.py:116: DeprecationWarning: The body attribute is deprecated, use expect instead
  handle_deprecations(doc)

 ✓ telemetry enabled

@jetjinser
Copy link

I also have the same problem 😢.

@elasticcode-ai
Copy link

@radiantone I think you will still be able to access the gui via the url http://127.0.0.1:47334

Yeah, but that's not the issue. When running the docker on nvidia hardware you need to be able to use the cuda libraries or training etc will be pathetically slow. So this is an easy fix, the docker just needs to be rebuilt with packages updated. But someone should do it soon since its broke.

@hamishfagg
Copy link
Contributor

@elasticcode-ai @jetjinser @radiantone do you still have this issue with the latest docker images?

@radiantone
Copy link
Author

radiantone commented Jan 3, 2024

@hamishfagg The original error about the missing shared library (because of outdated torchvision package) is gone, but a few others (warnings only) have shown up now.

mindsdb | [nltk_data] Downloading package punkt to /root/nltk_data...
mindsdb | [nltk_data] Unzipping tokenizers/punkt.zip.
mindsdb | /usr/local/lib/python3.10/site-packages/langchain/init.py:34: UserWarning: Importing Writer from langchain root module is no longer supported. Please use langchain.llms.Writer instead.
mindsdb | warnings.warn(
mindsdb | /usr/local/lib/python3.10/site-packages/torch/cuda/init.py:138: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 11040). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.)
mindsdb | return torch._C._cuda_getDeviceCount() > 0
mindsdb | 2024-01-03 14:52:53,508 MainProcess INFO mindsdb: ✓ telemetry enabled
mindsdb | /usr/local/lib/python3.10/site-packages/mindsdb/main.py:145: DeprecationWarning: 'JSONEncoder' is deprecated and will be removed in Flask 2.3. Use 'Flask.json' to provide an alternate JSON implementation instead.
mindsdb | db.init()

@ZoranPandovski
Copy link
Member

@radiantone This are warnings that you can ignore. Can you successfully access mindsdb on http://127.0.0.1:47334/?

@hamishfagg
Copy link
Contributor

Closing as this doesnt seem to be an issue anymore

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

8 participants