Closed dahwin closed 2 months ago
Multi-image support for InternVL2 is currently only available if you build vLLM from source. It will be in the next release!
!git clone https://github.com/vllm-project/vllm.git %cd vllm !pip install -e . # This may take 5-10 minutes.
I have cuda nvcc installed !which nvcc /opt/conda/bin/nvcc
Downloading pyairports-2.1.1-py3-none-any.whl (371 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 371.7/371.7 kB 28.1 MB/s eta 0:00:00
Downloading pycountry-24.6.1-py3-none-any.whl (6.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.3/6.3 MB 82.0 MB/s eta 0:00:00:00:0100:01
Building wheels for collected packages: vllm
Building editable for vllm (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building editable for vllm (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [150 lines of output]
/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/torch/_subclasses/functional_tensor.py:258: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:84.)
cpu = _conversion_method_template(device=torch.device("cpu"))
running editable_wheel
creating /tmp/pip-wheel-8119yhpq/.tmp-v_6fhrd0/vllm.egg-info
writing /tmp/pip-wheel-8119yhpq/.tmp-v_6fhrd0/vllm.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-wheel-8119yhpq/.tmp-v_6fhrd0/vllm.egg-info/dependency_links.txt
writing entry points to /tmp/pip-wheel-8119yhpq/.tmp-v_6fhrd0/vllm.egg-info/entry_points.txt
writing requirements to /tmp/pip-wheel-8119yhpq/.tmp-v_6fhrd0/vllm.egg-info/requires.txt
writing top-level names to /tmp/pip-wheel-8119yhpq/.tmp-v_6fhrd0/vllm.egg-info/top_level.txt
writing manifest file '/tmp/pip-wheel-8119yhpq/.tmp-v_6fhrd0/vllm.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-wheel-8119yhpq/.tmp-v_6fhrd0/vllm.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file '/tmp/pip-wheel-8119yhpq/.tmp-v_6fhrd0/vllm.egg-info/SOURCES.txt'
creating '/tmp/pip-wheel-8119yhpq/.tmp-v_6fhrd0/vllm-0.6.0+cu123.dist-info'
creating /tmp/pip-wheel-8119yhpq/.tmp-v_6fhrd0/vllm-0.6.0+cu123.dist-info/WHEEL
running build_py
running build_ext
-- The CXX compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type: RelWithDebInfo
-- Target device: cuda
-- Found Python: /opt/conda/bin/python3.10 (found version "3.10.14") found components: Interpreter Development.Module Development.SABIModule
-- Found python matching: /opt/conda/bin/python3.10.
-- Could NOT find CUDA (missing: CUDA_INCLUDE_DIRS) (found version "12.3")
CMake Warning at /tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:31 (message):
Caffe2: CUDA cannot be found. Depending on whether you are building Caffe2
or a Caffe2 dependent library, the next warning / error will give you more
info.
Call Stack (most recent call first):
/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:86 (include)
/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
CMakeLists.txt:70 (find_package)
CMake Error at /tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:90 (message):
Your installed Caffe2 version uses CUDA but I cannot find the CUDA
libraries. Please set the proper CUDA prefixes and / or install CUDA.
Call Stack (most recent call first):
/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
CMakeLists.txt:70 (find_package)
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 138, in run
self._create_wheel_file(bdist_wheel)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 341, in _create_wheel_file
files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 264, in _run_build_commands
self._run_build_subcommands()
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 291, in _run_build_subcommands
self.run_command(name)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 98, in run
_build_ext.run(self)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "<string>", line 226, in build_extensions
File "<string>", line 208, in configure
File "/opt/conda/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/kaggle/working/vllm', '-G', 'Ninja', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/tmp_29de3ur.build-lib/vllm', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=/tmp/tmpwymftevp.build-temp', '-DVLLM_TARGET_DEVICE=cuda', '-DVLLM_PYTHON_EXECUTABLE=/opt/conda/bin/python3.10', '-DVLLM_PYTHON_PATH=/opt/conda/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process:/tmp/pip-build-env-kdqvosxr/site:/opt/conda/lib/python310.zip:/opt/conda/lib/python3.10:/opt/conda/lib/python3.10/lib-dynload:/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages:/tmp/pip-build-env-kdqvosxr/normal/lib/python3.10/site-packages:/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_vendor', '-DNVCC_THREADS=1', '-DCMAKE_JOB_POOL_COMPILE:STRING=compile', '-DCMAKE_JOB_POOLS:STRING=compile=4']' returned non-zero exit status 1.
/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py:973: _DebuggingTips: Problem in editable installation.
!!
********************************************************************************
An error happened while installing `vllm` in editable mode.
The following steps are recommended to help debug this problem:
- Try to install the project normally, without using the editable mode.
Does the error still persist?
(If it does, try fixing the problem before attempting the editable mode).
- If you are using binary extensions, make sure you have all OS-level
dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
- Try the latest version of setuptools (maybe the error was already fixed).
- If you (or your project dependencies) are using any setuptools extension
or customization, make sure they support the editable mode.
After following the steps above, if the problem still persists and
you think this is related to how setuptools handles editable installations,
please submit a reproducible example
(see https://stackoverflow.com/help/minimal-reproducible-example) to:
https://github.com/pypa/setuptools/issues
See https://setuptools.pypa.io/en/latest/userguide/development_mode.html for details.
********************************************************************************
!!
cmd_obj.run()
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/opt/conda/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/opt/conda/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 273, in build_editable
return hook(wheel_directory, config_settings, metadata_directory)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 459, in build_editable
return self._build_with_temp_dir(
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 403, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 318, in run_setup
exec(code, locals())
File "<string>", line 475, in <module>
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 138, in run
self._create_wheel_file(bdist_wheel)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 341, in _create_wheel_file
files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 264, in _run_build_commands
self._run_build_subcommands()
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/command/editable_wheel.py", line 291, in _run_build_subcommands
self.run_command(name)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 98, in run
_build_ext.run(self)
File "/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "<string>", line 226, in build_extensions
File "<string>", line 208, in configure
File "/opt/conda/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/kaggle/working/vllm', '-G', 'Ninja', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/tmp_29de3ur.build-lib/vllm', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=/tmp/tmpwymftevp.build-temp', '-DVLLM_TARGET_DEVICE=cuda', '-DVLLM_PYTHON_EXECUTABLE=/opt/conda/bin/python3.10', '-DVLLM_PYTHON_PATH=/opt/conda/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process:/tmp/pip-build-env-kdqvosxr/site:/opt/conda/lib/python310.zip:/opt/conda/lib/python3.10:/opt/conda/lib/python3.10/lib-dynload:/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages:/tmp/pip-build-env-kdqvosxr/normal/lib/python3.10/site-packages:/tmp/pip-build-env-kdqvosxr/overlay/lib/python3.10/site-packages/setuptools/_vendor', '-DNVCC_THREADS=1', '-DCMAKE_JOB_POOL_COMPILE:STRING=compile', '-DCMAKE_JOB_POOLS:STRING=compile=4']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building editable for vllm
Failed to build vllm
ERROR: Could not build wheels for vllm, which is required to install pyproject.toml-based projects
!nvcc --version # verify that nvcc is in your PATH !/usr/local/cuda/bin/nvcc --version # verify that nvcc is in your CUDA_HOME
nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA Corporation Built on Wed_Nov_22_10:17:15_PST_2023 Cuda compilation tools, release 12.3, V12.3.107 Build cuda_12.3.r12.3/compiler.33567101_0 nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA Corporation Built on Wed_Nov_22_10:17:15_PST_2023 Cuda compilation tools, release 12.3, V12.3.107 Build cuda_12.3.r12.3/compiler.33567101_0
I'm not familiar with the installation process of vLLM. Can @youkaichao help with this?
It should be supported in vLLM 0.6.1 now so you can try installing directly from PyPI.
okay!
multi image inference for "OpenGVLab/InternVL2-8B" not working
I got this inference code from here https://github.com/vllm-project/vllm/blob/main/examples/offline_inference_vision_language_multi_image.py
Please help me to fix this error
Erros
Before submitting a new issue...