安装vllm出现bug
我在按照这个步骤安装能运行minicpm3的vllm时,发生了bug,git clone https://github.com/OpenBMB/vllm.git
cd vllm
git checkout minicpm3
pip install e .
我原先的vllm为0.4.2,cuda为11.8,bug详细内容为running build_ext
-- The CXX compiler identification is GNU 9.5.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: /data1/liushuliang/anaconda3/envs/MiniCPM/bin/python (found version "3.10.14") found components: Interpreter Development.Module Development.SABIModule
-- Found python matching: /data1/liushuliang/anaconda3/envs/MiniCPM/bin/python.
-- Found CUDA: /data1/liushuliang/cuda (found version "11.8")
-- The CUDA compiler identification is NVIDIA 11.8.89
CMake Error at /tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/cmake/data/share/cmake-3.30/Modules/CMakeDetermineCUDACompiler.cmake:273 (configure_file):
No such file or directory
Call Stack (most recent call first):
/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:47 (enable_language)
/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:86 (include)
/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
CMakeLists.txt:67 (find_package)
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /data1/liushuliang/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Found CUDAToolkit: /data1/liushuliang/cuda/include (found version "11.8.89")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Caffe2: CUDA detected: 11.8
-- Caffe2: CUDA nvcc is: /data1/liushuliang/cuda/bin/nvcc
-- Caffe2: CUDA toolkit directory: /data1/liushuliang/cuda
CMake Error at /tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:110 (message):
Caffe2: Couldn't determine version from header: Change Dir:
'/data2/liushuliang/MiniCPM/temp/vllm-minicpm3/build/temp.linux-x86_64-cpython-310/CMakeFiles/CMakeTmp'
Run Build Command(s): /tmp/pip-build-env-bvv9j5bt/overlay/bin/ninja -v
cmTC_c978c
[1/2] /usr/bin/c++ -I/data1/liushuliang/cuda/include -o
CMakeFiles/cmTC_c978c.dir/detect_cuda_version.cc.o -c
/data2/liushuliang/MiniCPM/temp/vllm-minicpm3/build/temp.linux-x86_64-cpython-310/detect_cuda_version.cc
FAILED: CMakeFiles/cmTC_c978c.dir/detect_cuda_version.cc.o
/usr/bin/c++ -I/data1/liushuliang/cuda/include -o
CMakeFiles/cmTC_c978c.dir/detect_cuda_version.cc.o -c
/data2/liushuliang/MiniCPM/temp/vllm-minicpm3/build/temp.linux-x86_64-cpython-310/detect_cuda_version.cc
Assembler messages:
Fatal error: can't create
CMakeFiles/cmTC_c978c.dir/detect_cuda_version.cc.o: No such file or
directory
ninja: build stopped: subcommand failed.
Call Stack (most recent call first):
/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:86 (include)
/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
CMakeLists.txt:67 (find_package)
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "/data1/liushuliang/anaconda3/envs/MiniCPM/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/data1/liushuliang/anaconda3/envs/MiniCPM/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 "/data1/liushuliang/anaconda3/envs/MiniCPM/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 421, in build_wheel
return self._build_with_temp_dir(
File "/tmp/pip-build-env-bvv9j5bt/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-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 318, in run_setup
exec(code, locals())
File "<string>", line 456, in <module>
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/command/bdist_wheel.py", line 384, in run
self.run_command("build")
File "/tmp/pip-build-env-bvv9j5bt/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-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/tmp/pip-build-env-bvv9j5bt/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-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 98, in run
_build_ext.run(self)
File "/tmp/pip-build-env-bvv9j5bt/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "<string>", line 219, in build_extensions
File "<string>", line 201, in configure
File "/data1/liushuliang/anaconda3/envs/MiniCPM/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/data2/liushuliang/MiniCPM/temp/vllm-minicpm3', '-G', 'Ninja', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/data2/liushuliang/MiniCPM/temp/vllm-minicpm3/build/lib.linux-x86_64-cpython-310/vllm', '-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=build/temp.linux-x86_64-cpython-310', '-DVLLM_TARGET_DEVICE=cuda', '-DVLLM_PYTHON_EXECUTABLE=/data1/liushuliang/anaconda3/envs/MiniCPM/bin/python', '-DNVCC_THREADS=1', '-DCMAKE_JOB_POOL_COMPILE:STRING=compile', '-DCMAKE_JOB_POOLS:STRING=compile=72']' 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 wheel for vllm
Successfully built e
Failed to build vllm
ERROR: Could not build wheels for vllm, which is required to install pyproject.toml-based projects
现在vllm官方支持了,直接pip安装vllm就行了