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]: Error while importing vllm since v0.6.6 #11683

Closed
1 task done
kkimmk opened this issue Jan 2, 2025 · 17 comments
Closed
1 task done

[Bug]: Error while importing vllm since v0.6.6 #11683

kkimmk opened this issue Jan 2, 2025 · 17 comments
Labels
bug Something isn't working

Comments

@kkimmk
Copy link

kkimmk commented Jan 2, 2025

Your current environment

The output of `python collect_env.py`
>>> import vllm
Warning: Your installation of OpenCV appears to be broken: module 'cv2.dnn' has no attribute 'DictValue'.Please follow the instructions at https://github.com/opencv/opencv-python/issues/884 to correct your environment. The import of cv2 has been skipped.
WARNING 01-02 10:53:16 cuda.py:32] You are using a deprecated `pynvml` package. Please install `nvidia-ml-py` instead, and make sure to uninstall `pynvml`. When both of them are installed, `pynvml` will take precedence and cause errors. See https://pypi.org/project/pynvml for more information.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/dist-packages/vllm/__init__.py", line 3, in <module>
    from vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs
  File "/usr/local/lib/python3.10/dist-packages/vllm/engine/arg_utils.py", line 11, in <module>
    from vllm.config import (CacheConfig, CompilationConfig, ConfigFormat,
  File "/usr/local/lib/python3.10/dist-packages/vllm/config.py", line 22, in <module>
    from vllm.model_executor.layers.quantization import (QUANTIZATION_METHODS,
  File "/usr/local/lib/python3.10/dist-packages/vllm/model_executor/__init__.py", line 1, in <module>
    from vllm.model_executor.parameter import (BasevLLMParameter,
  File "/usr/local/lib/python3.10/dist-packages/vllm/model_executor/parameter.py", line 7, in <module>
    from vllm.distributed import get_tensor_model_parallel_rank
  File "/usr/local/lib/python3.10/dist-packages/vllm/distributed/__init__.py", line 1, in <module>
    from .communication_op import *
  File "/usr/local/lib/python3.10/dist-packages/vllm/distributed/communication_op.py", line 6, in <module>
    from .parallel_state import get_tp_group
  File "/usr/local/lib/python3.10/dist-packages/vllm/distributed/parallel_state.py", line 38, in <module>
    import vllm.distributed.kv_transfer.kv_transfer_agent as kv_transfer
  File "/usr/local/lib/python3.10/dist-packages/vllm/distributed/kv_transfer/kv_transfer_agent.py", line 15, in <module>
    from vllm.distributed.kv_transfer.kv_connector.factory import (
  File "/usr/local/lib/python3.10/dist-packages/vllm/distributed/kv_transfer/kv_connector/factory.py", line 3, in <module>
    from .base import KVConnectorBase
  File "/usr/local/lib/python3.10/dist-packages/vllm/distributed/kv_transfer/kv_connector/base.py", line 14, in <module>
    from vllm.sequence import IntermediateTensors
  File "/usr/local/lib/python3.10/dist-packages/vllm/sequence.py", line 18, in <module>
    from vllm.multimodal import MultiModalDataDict, MultiModalPlaceholderDict
  File "/usr/local/lib/python3.10/dist-packages/vllm/multimodal/__init__.py", line 6, in <module>
    from .registry import MultiModalRegistry
  File "/usr/local/lib/python3.10/dist-packages/vllm/multimodal/registry.py", line 19, in <module>
    from .video import VideoPlugin
  File "/usr/local/lib/python3.10/dist-packages/vllm/multimodal/video.py", line 4, in <module>
    import cv2
  File "/usr/local/lib/python3.10/dist-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/usr/local/lib/python3.10/dist-packages/cv2/__init__.py", line 175, in bootstrap
    if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
  File "/usr/local/lib/python3.10/dist-packages/cv2/__init__.py", line 28, in __load_extra_py_code_for_module
    py_module = importlib.import_module(module_name)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/local/lib/python3.10/dist-packages/cv2/typing/__init__.py", line 171, in <module>
    LayerId = cv2.dnn.DictValue
AttributeError: partially initialized module 'cv2' has no attribute 'dnn' (most likely due to a circular import)

Model Input Dumps

No response

🐛 Describe the bug

Since v0.6.6, simply running import vllm results in the following error due to an issue with cv2.

error message
>>> import vllm
Warning: Your installation of OpenCV appears to be broken: module 'cv2.dnn' has no attribute 'DictValue'.Please follow the instructions at https://github.com/opencv/opencv-python/issues/884 to correct your environment. The import of cv2 has been skipped.
WARNING 01-02 10:53:16 cuda.py:32] You are using a deprecated `pynvml` package. Please install `nvidia-ml-py` instead, and make sure to uninstall `pynvml`. When both of them are installed, `pynvml` will take precedence and cause errors. See https://pypi.org/project/pynvml for more information.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/dist-packages/vllm/__init__.py", line 3, in <module>
    from vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs
  File "/usr/local/lib/python3.10/dist-packages/vllm/engine/arg_utils.py", line 11, in <module>
    from vllm.config import (CacheConfig, CompilationConfig, ConfigFormat,
  File "/usr/local/lib/python3.10/dist-packages/vllm/config.py", line 22, in <module>
    from vllm.model_executor.layers.quantization import (QUANTIZATION_METHODS,
  File "/usr/local/lib/python3.10/dist-packages/vllm/model_executor/__init__.py", line 1, in <module>
    from vllm.model_executor.parameter import (BasevLLMParameter,
  File "/usr/local/lib/python3.10/dist-packages/vllm/model_executor/parameter.py", line 7, in <module>
    from vllm.distributed import get_tensor_model_parallel_rank
  File "/usr/local/lib/python3.10/dist-packages/vllm/distributed/__init__.py", line 1, in <module>
    from .communication_op import *
  File "/usr/local/lib/python3.10/dist-packages/vllm/distributed/communication_op.py", line 6, in <module>
    from .parallel_state import get_tp_group
  File "/usr/local/lib/python3.10/dist-packages/vllm/distributed/parallel_state.py", line 38, in <module>
    import vllm.distributed.kv_transfer.kv_transfer_agent as kv_transfer
  File "/usr/local/lib/python3.10/dist-packages/vllm/distributed/kv_transfer/kv_transfer_agent.py", line 15, in <module>
    from vllm.distributed.kv_transfer.kv_connector.factory import (
  File "/usr/local/lib/python3.10/dist-packages/vllm/distributed/kv_transfer/kv_connector/factory.py", line 3, in <module>
    from .base import KVConnectorBase
  File "/usr/local/lib/python3.10/dist-packages/vllm/distributed/kv_transfer/kv_connector/base.py", line 14, in <module>
    from vllm.sequence import IntermediateTensors
  File "/usr/local/lib/python3.10/dist-packages/vllm/sequence.py", line 18, in <module>
    from vllm.multimodal import MultiModalDataDict, MultiModalPlaceholderDict
  File "/usr/local/lib/python3.10/dist-packages/vllm/multimodal/__init__.py", line 6, in <module>
    from .registry import MultiModalRegistry
  File "/usr/local/lib/python3.10/dist-packages/vllm/multimodal/registry.py", line 19, in <module>
    from .video import VideoPlugin
  File "/usr/local/lib/python3.10/dist-packages/vllm/multimodal/video.py", line 4, in <module>
    import cv2
  File "/usr/local/lib/python3.10/dist-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/usr/local/lib/python3.10/dist-packages/cv2/__init__.py", line 175, in bootstrap
    if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
  File "/usr/local/lib/python3.10/dist-packages/cv2/__init__.py", line 28, in __load_extra_py_code_for_module
    py_module = importlib.import_module(module_name)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/local/lib/python3.10/dist-packages/cv2/typing/__init__.py", line 171, in <module>
    LayerId = cv2.dnn.DictValue
AttributeError: partially initialized module 'cv2' has no attribute 'dnn' (most likely due to a circular import)

vllm was installed using pip install vllm inside a Docker container.

docker run --gpus all -it --ipc=host nvcr.io/nvidia/pytorch:23.10-py3

While there may be workarounds to make it work, it would be better to ensure that pip install vllm works without modifications(for future versions), as it did in previous versions.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
@kkimmk kkimmk added the bug Something isn't working label Jan 2, 2025
@DarkLight1337
Copy link
Member

I suspect the opencv library in the pytorch image conflicts with the mistral-common[opencv] dependency of vLLM. Can you check that only the latter is installed in your Python environment?

@kkimmk
Copy link
Author

kkimmk commented Jan 2, 2025

Installing only mistral-common[opencv] still has the same problem. There can be several other workarounds regarding the opencv version to make it work.

However, since the above approach is a basic and common way to install vLLM(especially for services that install vLLM on-the-fly), I believe it would be better to address the issue directly to ensure it works seamlessly without requiring additional workarounds, as was the case with versions below v0.6.6. (It was the reason for opening this issue. I updated the description to make it clearer)

For example, as in v0.6.5[code], handling exceptions for import cv2 or updating the whl file itself seems like a more robust solution.

@DarkLight1337
Copy link
Member

DarkLight1337 commented Jan 2, 2025

Did you uninstall the existing opencv before installing mistral-common[opencv]?

@kkimmk
Copy link
Author

kkimmk commented Jan 2, 2025

Yes I did. v0.6.5 installs the same version, but it runs without the error on the same container, because it handles the exception inside the code.

@DarkLight1337
Copy link
Member

DarkLight1337 commented Jan 2, 2025

Can you show the output of pip list? I prefer solving the root cause of this since the error would still prevent usage of certain models even with the suggested workaround.

@kkimmk
Copy link
Author

kkimmk commented Jan 2, 2025

Sure.

output
root@e3ab9c50d9ef:/workspace# pip list
Package                           Version
--------------------------------- --------------------
absl-py                           2.0.0
aiohttp                           3.8.5
aiohttp-cors                      0.7.0
aiosignal                         1.3.1
airportsdata                      20241001
annotated-types                   0.7.0
anyio                             4.7.0
apex                              0.1
argon2-cffi                       23.1.0
argon2-cffi-bindings              21.2.0
astor                             0.8.1
asttokens                         2.4.0
astunparse                        1.6.3
async-timeout                     4.0.3
attrs                             23.1.0
audioread                         3.0.1
backcall                          0.2.0
beautifulsoup4                    4.12.2
blake3                            1.0.0
bleach                            6.0.0
blis                              0.7.11
cachetools                        5.3.1
catalogue                         2.0.10
certifi                           2023.7.22
cffi                              1.16.0
charset-normalizer                3.2.0
click                             8.1.6
cloudpathlib                      0.15.1
cloudpickle                       2.2.1
cmake                             3.27.6
colorful                          0.5.6
comm                              0.1.4
compressed-tensors                0.8.1
confection                        0.1.3
contourpy                         1.1.1
cubinlinker                       0.3.0+2.gce0680b
cuda-python                       12.2.0rc5+5.g84845d1
cudf                              23.8.0
cugraph                           23.8.0
cugraph-dgl                       23.8.0
cugraph-service-client            23.8.0
cugraph-service-server            23.8.0
cuml                              23.8.0
cupy-cuda12x                      12.1.0
cycler                            0.12.1
cymem                             2.0.8
Cython                            3.0.3
dask                              2023.7.1
dask-cuda                         23.8.0
dask-cudf                         23.8.0
debugpy                           1.8.0
decorator                         5.1.1
defusedxml                        0.7.1
depyf                             0.18.0
dill                              0.3.9
diskcache                         5.6.3
distlib                           0.3.9
distributed                       2023.7.1
distro                            1.9.0
dm-tree                           0.1.8
einops                            0.7.0
exceptiongroup                    1.1.3
execnet                           2.0.2
executing                         2.0.0
expecttest                        0.1.3
fastapi                           0.115.6
fastjsonschema                    2.18.1
fastrlock                         0.8.1
filelock                          3.16.1
flash-attn                        2.0.4
fonttools                         4.43.1
frozenlist                        1.4.0
fsspec                            2023.6.0
gast                              0.5.4
gguf                              0.10.0
google-api-core                   2.24.0
google-auth                       2.23.2
google-auth-oauthlib              0.4.6
googleapis-common-protos          1.66.0
graphsurgeon                      0.4.6
grpcio                            1.59.0
h11                               0.14.0
httpcore                          1.0.7
httptools                         0.6.4
httpx                             0.28.1
huggingface-hub                   0.27.0
hypothesis                        5.35.1
idna                              3.4
importlib-metadata                6.8.0
iniconfig                         2.0.0
intel-openmp                      2021.4.0
interegular                       0.3.3
ipykernel                         6.25.2
ipython                           8.16.1
ipython-genutils                  0.2.0
jedi                              0.19.1
Jinja2                            3.1.2
jiter                             0.8.2
joblib                            1.3.2
json5                             0.9.14
jsonschema                        4.23.0
jsonschema-specifications         2023.7.1
jupyter_client                    8.3.1
jupyter_core                      5.3.2
jupyter-tensorboard               0.2.0
jupyterlab                        2.3.2
jupyterlab-pygments               0.2.2
jupyterlab-server                 1.2.0
jupytext                          1.15.2
kiwisolver                        1.4.5
langcodes                         3.3.0
lark                              1.2.2
librosa                           0.9.2
linkify-it-py                     2.0.3
llvmlite                          0.40.1
lm-format-enforcer                0.10.9
locket                            1.0.0
Markdown                          3.4.4
markdown-it-py                    3.0.0
MarkupSafe                        2.1.3
matplotlib                        3.8.0
matplotlib-inline                 0.1.6
mdit-py-plugins                   0.4.0
mdurl                             0.1.2
memray                            1.15.0
mistral_common                    1.5.1
mistune                           3.0.2
mkl                               2021.1.1
mkl-devel                         2021.1.1
mkl-include                       2021.1.1
mock                              5.1.0
mpmath                            1.3.0
msgpack                           1.0.5
msgspec                           0.19.0
multidict                         6.0.4
murmurhash                        1.0.10
nbclient                          0.8.0
nbconvert                         7.9.2
nbformat                          5.9.2
nest-asyncio                      1.5.8
networkx                          2.6.3
ninja                             1.11.1.1
notebook                          6.4.10
numba                             0.57.1+1.g5fba9aa8f
numpy                             1.26.4
nvfuser                           0.0.20+gitunknown
nvidia-cublas-cu12                12.4.5.8
nvidia-cuda-cupti-cu12            12.4.127
nvidia-cuda-nvrtc-cu12            12.4.127
nvidia-cuda-runtime-cu12          12.4.127
nvidia-cudnn-cu12                 9.1.0.70
nvidia-cufft-cu12                 11.2.1.3
nvidia-curand-cu12                10.3.5.147
nvidia-cusolver-cu12              11.6.1.9
nvidia-cusparse-cu12              12.3.1.170
nvidia-dali-cuda120               1.30.0
nvidia-ml-py                      12.560.30
nvidia-nccl-cu12                  2.21.5
nvidia-nvjitlink-cu12             12.4.127
nvidia-nvtx-cu12                  12.4.127
nvidia-pyindex                    1.0.9
nvtx                              0.2.5
oauthlib                          3.2.2
onnx                              1.14.0
openai                            1.58.1
opencensus                        0.11.4
opencensus-context                0.1.3
opencv-python-headless            4.10.0.84
outlines                          0.1.11
outlines_core                     0.1.26
packaging                         23.1
pandas                            1.5.3
pandocfilters                     1.5.0
parso                             0.8.3
partd                             1.4.0
partial-json-parser               0.2.1.1.post4
pathy                             0.10.2
pexpect                           4.8.0
pickleshare                       0.7.5
pillow                            10.4.0
pip                               23.2.1
platformdirs                      3.11.0
pluggy                            1.3.0
ply                               3.11
polygraphy                        0.49.0
pooch                             1.7.0
preshed                           3.0.9
prettytable                       3.9.0
prometheus_client                 0.21.1
prometheus-fastapi-instrumentator 7.0.0
prompt-toolkit                    3.0.39
proto-plus                        1.25.0
protobuf                          4.24.4
psutil                            5.9.4
ptxcompiler                       0.8.1+1.g2cb1b35
ptyprocess                        0.7.0
pure-eval                         0.2.2
py-cpuinfo                        9.0.0
py-spy                            0.4.0
pyarrow                           11.0.0
pyasn1                            0.5.0
pyasn1-modules                    0.3.0
pybind11                          2.11.1
pybind11-global                   2.11.1
pycocotools                       2.0+nv0.7.3
pycountry                         24.6.1
pycparser                         2.21
pydantic                          2.10.4
pydantic_core                     2.27.2
Pygments                          2.16.1
pylibcugraph                      23.8.0
pylibcugraphops                   23.8.0
pylibraft                         23.8.0
pynvml                            11.4.1
pyparsing                         3.1.1
pytest                            7.4.2
pytest-flakefinder                1.1.0
pytest-rerunfailures              12.0
pytest-shard                      0.1.2
pytest-xdist                      3.3.1
python-dateutil                   2.8.2
python-dotenv                     1.0.1
python-hostlist                   1.23.0
pytorch-quantization              2.1.2
pytz                              2023.3
PyYAML                            6.0.1
pyzmq                             25.1.1
raft-dask                         23.8.0
ray                               2.40.0
referencing                       0.30.2
regex                             2023.10.3
requests                          2.31.0
requests-oauthlib                 1.3.1
resampy                           0.4.2
rich                              13.9.4
rmm                               23.8.0
rpds-py                           0.10.4
rsa                               4.9
safetensors                       0.4.5
scikit-learn                      1.2.0
scipy                             1.11.1
Send2Trash                        1.8.2
sentencepiece                     0.2.0
setuptools                        68.2.2
six                               1.16.0
smart-open                        6.4.0
sniffio                           1.3.1
sortedcontainers                  2.4.0
soundfile                         0.12.1
soupsieve                         2.5
spacy                             3.7.1
spacy-legacy                      3.0.12
spacy-loggers                     1.0.5
sphinx-glpi-theme                 0.3
srsly                             2.4.8
stack-data                        0.6.3
starlette                         0.41.3
sympy                             1.13.1
tabulate                          0.9.0
tbb                               2021.10.0
tblib                             2.0.0
tensorboard                       2.9.0
tensorboard-data-server           0.6.1
tensorboard-plugin-wit            1.8.1
tensorrt                          8.6.1
terminado                         0.17.1
textual                           1.0.0
thinc                             8.2.1
threadpoolctl                     3.2.0
thriftpy2                         0.4.16
tiktoken                          0.7.0
tinycss2                          1.2.1
tokenizers                        0.21.0
toml                              0.10.2
tomli                             2.0.1
toolz                             0.12.0
torch                             2.5.1
torch-tensorrt                    0.0.0
torchdata                         0.7.0a0
torchtext                         0.16.0a0
torchvision                       0.20.1
tornado                           6.3.3
tqdm                              4.66.1
traitlets                         5.9.0
transformer-engine                0.12.0+170797
transformers                      4.47.1
treelite                          3.2.0
treelite-runtime                  3.2.0
triton                            3.1.0
typer                             0.9.0
types-dataclasses                 0.6.6
typing_extensions                 4.12.2
uc-micro-py                       1.0.3
ucx-py                            0.33.0
uff                               0.6.9
urllib3                           1.26.16
uvicorn                           0.34.0
uvloop                            0.21.0
virtualenv                        20.28.0
vllm                              0.6.6.post1
wasabi                            1.1.2
watchfiles                        1.0.3
wcwidth                           0.2.8
weasel                            0.3.2
webencodings                      0.5.1
websockets                        14.1
Werkzeug                          3.0.0
wheel                             0.41.2
xdoctest                          1.0.2
xformers                          0.0.28.post3
xgboost                           1.7.5
xgrammar                          0.1.8
yarl                              1.9.2
zict                              3.0.0
zipp                              3.16.2

@kkimmk
Copy link
Author

kkimmk commented Jan 2, 2025

FYI, installing opencv-python-headless==4.8.0.74 works fine.

@DarkLight1337
Copy link
Member

cc @patrickvonplaten maybe we should lock the version of opencv?

@patrickvonplaten
Copy link
Contributor

This actually doesn't seem to be related to mistral_common but to the video.py file no?

  File "/usr/local/lib/python3.10/dist-packages/vllm/multimodal/video.py", line 4, in <module>
    import cv2

@kkimmk
Copy link
Author

kkimmk commented Jan 3, 2025

It's related to opencv version, which is installed from mistral_common[opencv] and imported in the video.py.

@ywang96
Copy link
Member

ywang96 commented Jan 4, 2025

We should modify multimodal/video.py to handle cv import similar to how we handled it inside util.py. I will make a PR.

@DarkLight1337
Copy link
Member

We should modify multimodal/video.py to handle cv import similar to how we handled it inside util.py. I will make a PR.

Currently, opencv isn't an optional dependency. Perhaps we can make it one?

@ywang96
Copy link
Member

ywang96 commented Jan 4, 2025

Currently, opencv isn't an optional dependency. Perhaps we can make it one?

Actually you're right. I don't think the reported bug is expected. I just tried installing the latest python package on a clean docker container and it worked.

➜  ~ ipython
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.31.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import vllm

In [2]: import cv2

In [3]: print(vllm.__version__)
0.6.6.post1

In [4]: print(cv2.__version__)
4.10.0

@kkimmk
Copy link
Author

kkimmk commented Jan 6, 2025

@ywang96 So, is it not reproducible on your environment? I used nvcr.io/nvidia/pytorch:23.10-py3, simply with these commands and it's still reproducible on my side.

docker run --gpus all -it --ipc=host nvcr.io/nvidia/pytorch:23.10-py3
pip install vllm

And also posting the results of running python collect_env.py with vllm==0.6.5(since 0.6.6 and above show the error), to provide details of my environment, aside from the vllm version.

The output of `python collect_env.py`
Warning: Your installation of OpenCV appears to be broken: module 'cv2.dnn' has no attribute 'DictValue'.Please follow the instructions at https://github.com/opencv/opencv-python/issues/884 to correct your environment. The import of cv2 has been skipped.
WARNING 01-06 02:17:36 cuda.py:32] You are using a deprecated `pynvml` package. Please install `nvidia-ml-py` instead, and make sure to uninstall `pynvml`. When both of them are installed, `pynvml` will take precedence and cause errors. See https://pypi.org/project/pynvml for more information.
Collecting environment information...
PyTorch version: 2.5.1+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.3 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.27.6
Libc version: glibc-2.35

Python version: 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-5.15.0-102-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.2.140
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA RTX A6000
GPU 1: NVIDIA RTX A6000

Nvidia driver version: 535.171.04
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.5
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      43 bits physical, 48 bits virtual
Byte Order:                         Little Endian
CPU(s):                             32
On-line CPU(s) list:                0-31
Vendor ID:                          AuthenticAMD
Model name:                         AMD Ryzen Threadripper PRO 3955WX 16-Cores
CPU family:                         23
Model:                              49
Thread(s) per core:                 2
Core(s) per socket:                 16
Socket(s):                          1
Stepping:                           0
Frequency boost:                    enabled
CPU max MHz:                        4402.7339
CPU min MHz:                        2200.0000
BogoMIPS:                           7785.79
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip rdpid overflow_recov succor smca sme sev sev_es
Virtualization:                     AMD-V
L1d cache:                          512 KiB (16 instances)
L1i cache:                          512 KiB (16 instances)
L2 cache:                           8 MiB (16 instances)
L3 cache:                           64 MiB (4 instances)
NUMA node(s):                       1
NUMA node0 CPU(s):                  0-31
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Not affected
Vulnerability Retbleed:             Mitigation; untrained return thunk; SMT enabled with STIBP protection
Vulnerability Spec rstack overflow: Mitigation; safe RET
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Retpolines, IBPB conditional, STIBP always-on, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==12.4.5.8
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvrtc-cu12==12.4.127
[pip3] nvidia-cuda-runtime-cu12==12.4.127
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu12==11.2.1.3
[pip3] nvidia-curand-cu12==10.3.5.147
[pip3] nvidia-cusolver-cu12==11.6.1.9
[pip3] nvidia-cusparse-cu12==12.3.1.170
[pip3] nvidia-dali-cuda120==1.30.0
[pip3] nvidia-ml-py==12.560.30
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] nvidia-pyindex==1.0.9
[pip3] onnx==1.14.0
[pip3] pynvml==11.4.1
[pip3] pytorch-quantization==2.1.2
[pip3] pyzmq==25.1.1
[pip3] torch==2.5.1
[pip3] torch-tensorrt==0.0.0
[pip3] torchdata==0.7.0a0
[pip3] torchtext==0.16.0a0
[pip3] torchvision==0.20.1
[pip3] transformers==4.47.1
[pip3] triton==3.1.0
[conda] Could not collect
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.6.5
vLLM Build Flags:
CUDA Archs: 5.2 6.0 6.1 7.0 7.2 7.5 8.0 8.6 8.7 9.0+PTX; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0    GPU1    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      PHB     0-31    0               N/A
GPU1    PHB      X      0-31    0               N/A

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

NVIDIA_VISIBLE_DEVICES=all
CUBLAS_VERSION=12.2.5.6
NVIDIA_REQUIRE_CUDA=cuda>=9.0
CUDA_CACHE_DISABLE=1
TORCH_CUDA_ARCH_LIST=5.2 6.0 6.1 7.0 7.2 7.5 8.0 8.6 8.7 9.0+PTX
NCCL_VERSION=2.19.3
NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
NVIDIA_PRODUCT_NAME=PyTorch
CUDA_VERSION=12.2.2.009
PYTORCH_VERSION=2.1.0a0+32f93b1
PYTORCH_BUILD_NUMBER=0
CUDNN_VERSION=8.9.5.29
PYTORCH_HOME=/opt/pytorch/pytorch
LD_LIBRARY_PATH=/usr/local/lib/python3.10/dist-packages/cv2/../../lib64:/usr/local/lib/python3.10/dist-packages/torch/lib:/usr/local/lib/python3.10/dist-packages/torch_tensorrt/lib:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
NVIDIA_BUILD_ID=71422337
CUDA_DRIVER_VERSION=535.104.05
PYTORCH_BUILD_VERSION=2.1.0a0+32f93b1
CUDA_HOME=/usr/local/cuda
CUDA_HOME=/usr/local/cuda
CUDA_MODULE_LOADING=LAZY
NVIDIA_REQUIRE_JETPACK_HOST_MOUNTS=
NVIDIA_PYTORCH_VERSION=23.10
TORCH_ALLOW_TF32_CUBLAS_OVERRIDE=1

@ywang96
Copy link
Member

ywang96 commented Jan 6, 2025

@ywang96 So, is it not reproducible on your environment?

@kkimmk Yea, can you try an image without pytorch preinstalled? (You're going to reinstall pytorch anyways). For example nvidia/cuda:12.6.3-cudnn-devel-ubuntu20.04

As you can see the first line of the collect_env.py already indicated the installation didn't go through.

@kkimmk
Copy link
Author

kkimmk commented Jan 6, 2025

@ywang96 Yes, it worked with nvidia/cuda:12.6.3-cudnn-devel-ubuntu22.04.
I'll close this issue, as everything seems clear now.
However, please consider resolving the dependency issue with containers that have pytorch installed(nvcr.io/nvidia/pytorch:23.10-py3), because I believe it's more common container being used and it's also written in the official installation documentation.
Thank you!

@kkimmk kkimmk closed this as completed Jan 6, 2025
@fpcsong
Copy link

fpcsong commented Jan 7, 2025

FYI, installing opencv-python-headless==4.8.0.74 works fine.

This works for me. THX.

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

5 participants