vllm-project / vllm

A high-throughput and memory-efficient inference and serving engine for LLMs
https://docs.vllm.ai
Apache License 2.0
30.79k stars 4.68k forks source link

[Bug]: Installation Issue with torch Version Conflict on vllm v0.5.0.post1 #5576

Open zhaoxu98 opened 5 months ago

zhaoxu98 commented 5 months ago

Your current environment

Collecting environment information...
PyTorch version: 2.3.1
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.2 LTS (x86_64)
GCC version: (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.35

Python version: 3.12.3 | packaged by Anaconda, Inc. | (main, May  6 2024, 19:46:43) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.4.0-165-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA A800-SXM4-80GB
Nvidia driver version: 535.54.03
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.0
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:                      52 bits physical, 57 bits virtual
Byte Order:                         Little Endian
CPU(s):                             64
On-line CPU(s) list:                0-63
Vendor ID:                          GenuineIntel
Model name:                         Intel(R) Xeon(R) Platinum 8358P CPU @ 2.60GHz
CPU family:                         6
Model:                              106
Thread(s) per core:                 1
Core(s) per socket:                 32
Socket(s):                          2
Stepping:                           6
CPU max MHz:                        3400.0000
CPU min MHz:                        800.0000
BogoMIPS:                           5200.00
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 invpcid_single ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid md_clear pconfig flush_l1d arch_capabilities
Virtualization:                     VT-x
L1d cache:                          3 MiB (64 instances)
L1i cache:                          2 MiB (64 instances)
L2 cache:                           80 MiB (64 instances)
L3 cache:                           96 MiB (2 instances)
NUMA node(s):                       2
NUMA node0 CPU(s):                  0-31
NUMA node1 CPU(s):                  32-63
Vulnerability Gather data sampling: Mitigation; Microcode
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Mitigation; Clear CPU buffers; SMT disabled
Vulnerability Retbleed:             Not affected
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; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] torch==2.3.1
[pip3] torchaudio==2.3.1
[pip3] torchvision==0.18.1
[conda] blas                      1.0                         mkl    defaults
[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch
[conda] libjpeg-turbo             2.0.0                h9bf148f_0    pytorch
[conda] mkl                       2023.1.0         h213fc3f_46344    defaults
[conda] mkl-service               2.4.0           py312h5eee18b_1    defaults
[conda] mkl_fft                   1.3.8           py312h5eee18b_0    defaults
[conda] mkl_random                1.2.4           py312hdb19cb5_0    defaults
[conda] numpy                     1.26.4          py312hc5e2394_0    defaults
[conda] numpy-base                1.26.4          py312h0da6c21_0    defaults
[conda] pytorch                   2.3.1           py3.12_cuda12.1_cudnn8.9.2_0    pytorch
[conda] pytorch-cuda              12.1                 ha16c6d3_5    pytorch
[conda] pytorch-mutex             1.0                        cuda    pytorch
[conda] torchaudio                2.3.1               py312_cu121    pytorch
[conda] torchvision               0.18.1              py312_cu121    pytorch
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: N/A
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0    NIC0    NIC1    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      SYS     SYS     32-63   1               N/A
NIC0    SYS      X      PIX
NIC1    SYS     PIX      X 

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

NIC Legend:

  NIC0: mlx5_0
  NIC1: mlx5_bond_0

🐛 Describe the bug

Hi,

I encountered an issue while installing the latest release of vllm (v0.5.0.post1), which now supports torch 2.3.0. When executing the command pip install vllm, I received the following error:

pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
      Collecting ninja
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6d/92/8d7aebd4430ab5ff65df2bfee6d5745f95c004284db2d8ca76dcbfd9de47/ninja-1.11.1.1-py2.py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl (307 kB)
      Collecting packaging
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/08/aa/cc0199a5f0ad350994d660967a8efb233fe0416e4639146c089643407ce6/packaging-24.1-py3-none-any.whl (53 kB)
      Collecting setuptools>=49.4.0
        Using cached https://pypi.tuna.tsinghua.edu.cn/packages/de/88/70c5767a0e43eb4451c2200f07d042a4bcd7639276003a9c54a68cfcc1f8/setuptools-70.0.0-py3-none-any.whl (863 kB)
      ERROR: Could not find a version that satisfies the requirement torch==2.1.2 (from versions: 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1)
      ERROR: No matching distribution found for torch==2.1.2
      [end of output]

Interestingly, the requirements-cuda.txt specifies torch >= 2.3.0. It appears that there might be a version conflict with some dependencies, possibly with ninja. Could you help me understand the source of this issue?

Thank you!

youkaichao commented 5 months ago

please use pip install -vvv vllm to get more info .

zhaoxu98 commented 5 months ago

please use pip install -vvv vllm to get more info .

Thanks for your reply. Here are detailed output of pip install -vvv vllm

creating /tmp/pip-modern-metadata-i6noz1gk/vllm.egg-info
  writing /tmp/pip-modern-metadata-i6noz1gk/vllm.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-modern-metadata-i6noz1gk/vllm.egg-info/dependency_links.txt
  writing requirements to /tmp/pip-modern-metadata-i6noz1gk/vllm.egg-info/requires.txt
  writing top-level names to /tmp/pip-modern-metadata-i6noz1gk/vllm.egg-info/top_level.txt
  writing manifest file '/tmp/pip-modern-metadata-i6noz1gk/vllm.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-modern-metadata-i6noz1gk/vllm.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE'
  writing manifest file '/tmp/pip-modern-metadata-i6noz1gk/vllm.egg-info/SOURCES.txt'
  creating '/tmp/pip-modern-metadata-i6noz1gk/vllm-0.4.1.dist-info'
  Preparing metadata (pyproject.toml) ... done
  Source in /tmp/pip-install-j494k9p6/vllm_258e44343b2741a8aeb78607febf0bdb has version 0.4.1, which satisfies requirement vllm from https://pypi.tuna.tsinghua.edu.cn/packages/b6/59/21a037891a7855cae232ee4add3aee9d891f5b4f49f0d86795835270fb57/vllm-0.4.1.tar.gz
  Removed vllm from https://pypi.tuna.tsinghua.edu.cn/packages/b6/59/21a037891a7855cae232ee4add3aee9d891f5b4f49f0d86795835270fb57/vllm-0.4.1.tar.gz from build tracker '/tmp/pip-build-tracker-ldw8yzf0'
  Created temporary directory: /tmp/pip-unpack-lrb7rgl2
  Found index url https://pypi.tuna.tsinghua.edu.cn/simple/
  Looking up "https://pypi.tuna.tsinghua.edu.cn/packages/91/5e/157e46eccdc168b0a42cafb12ad0a9f992ff8fbee25cc97bc2464bd71bcf/vllm-0.3.3.tar.gz" in the cache
  Current age based on date: 3882
  https://pypi.tuna.tsinghua.edu.cn:443 "GET /packages/91/5e/157e46eccdc168b0a42cafb12ad0a9f992ff8fbee25cc97bc2464bd71bcf/vllm-0.3.3.tar.gz HTTP/1.1" 304 0
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/91/5e/157e46eccdc168b0a42cafb12ad0a9f992ff8fbee25cc97bc2464bd71bcf/vllm-0.3.3.tar.gz (315 kB)
  Added vllm from https://pypi.tuna.tsinghua.edu.cn/packages/91/5e/157e46eccdc168b0a42cafb12ad0a9f992ff8fbee25cc97bc2464bd71bcf/vllm-0.3.3.tar.gz to build tracker '/tmp/pip-build-tracker-ldw8yzf0'
  Created temporary directory: /tmp/pip-build-env-eqcqrlor
  Running command pip subprocess to install build dependencies
  Using pip 24.0 from /hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip (python 3.12)
  Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
  Collecting ninja
    Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6d/92/8d7aebd4430ab5ff65df2bfee6d5745f95c004284db2d8ca76dcbfd9de47/ninja-1.11.1.1-py2.py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl (307 kB)
  Collecting packaging
    Using cached https://pypi.tuna.tsinghua.edu.cn/packages/08/aa/cc0199a5f0ad350994d660967a8efb233fe0416e4639146c089643407ce6/packaging-24.1-py3-none-any.whl (53 kB)
  Collecting setuptools>=49.4.0
    Using cached https://pypi.tuna.tsinghua.edu.cn/packages/de/88/70c5767a0e43eb4451c2200f07d042a4bcd7639276003a9c54a68cfcc1f8/setuptools-70.0.0-py3-none-any.whl (863 kB)
  ERROR: Could not find a version that satisfies the requirement torch==2.1.2 (from versions: 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1)
  ERROR: No matching distribution found for torch==2.1.2
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /hpc2hdd/home/zxu674/anaconda3/envs/acd/bin/python /hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/__pip-runner__.py install --ignore-installed --no-user --prefix /tmp/pip-build-env-eqcqrlor/overlay --no-warn-script-location -v --no-binary :none: --only-binary :none: -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host mirrors.aliyun.com -- ninja packaging 'setuptools >= 49.4.0' 'torch == 2.1.2' wheel
  cwd: [inherit]
  Installing build dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Exception information:
Traceback (most recent call last):
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/commands/install.py", line 377, in run
    requirement_set = resolver.resolve(
                      ^^^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 427, in resolve
    failure_causes = self._attempt_to_pin_criterion(name)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py", line 237, in _attempt_to_pin_criterion
    for candidate in criterion.candidates:
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
    candidate = func()
                ^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 182, in _make_candidate_from_link
    base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 228, in _make_base_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
                                       ^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 290, in __init__
    super().__init__(
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
    self.dist = self._prepare()
                ^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 222, in _prepare
    dist = self._prepare_distribution()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 301, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/operations/prepare.py", line 525, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/operations/prepare.py", line 640, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/operations/prepare.py", line 71, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/distributions/sdist.py", line 44, in prepare_distribution_metadata
    self._prepare_build_backend(finder)
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/distributions/sdist.py", line 76, in _prepare_build_backend
    self.req.build_env.install_requirements(
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/build_env.py", line 217, in install_requirements
    self._install_requirements(
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/build_env.py", line 275, in _install_requirements
    call_subprocess(
  File "/hpc2hdd/home/zxu674/anaconda3/envs/acd/lib/python3.12/site-packages/pip/_internal/utils/subprocess.py", line 224, in call_subprocess
    raise error
pip._internal.exceptions.InstallationSubprocessError: pip subprocess to install build dependencies exited with 1
Remote version of pip: 24.0
Local version of pip:  24.0
Was pip installed by pip? False
Removed vllm from https://pypi.tuna.tsinghua.edu.cn/packages/91/5e/157e46eccdc168b0a42cafb12ad0a9f992ff8fbee25cc97bc2464bd71bcf/vllm-0.3.3.tar.gz from build tracker '/tmp/pip-build-tracker-ldw8yzf0'
Removed build tracker: '/tmp/pip-build-tracker-ldw8yzf0'
youkaichao commented 5 months ago

creating '/tmp/pip-modern-metadata-i6noz1gk/vllm-0.4.1.dist-info'

You are installing 0.4.1.

Try pip install vllm==0.5.0.post1 ?

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this issue should remain open. Thank you!

moyans commented 1 week ago

同样的问题,有人解决了么