vllm
vllm copied to clipboard
[Bug]: Unable to run vllm docker container with 2 4090
Your current environment
Collecting environment information...
PyTorch version: 2.1.2+cu121
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.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.35
Python version: 3.11.5 (main, Sep 11 2023, 13:54:46) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 11.5.119
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA GeForce RTX 4090
GPU 1: NVIDIA GeForce RTX 4090
Nvidia driver version: 546.17
cuDNN version: Could not collect
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: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Vendor ID: GenuineIntel
Model name: Intel(R) Core(TM) i9-14900K
CPU family: 6
Model: 183
Thread(s) per core: 2
Core(s) per socket: 16
Socket(s): 1
Stepping: 1
BogoMIPS: 6374.39
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq vmx ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves avx_vnni umip waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize flush_l1d arch_capabilities
Virtualization: VT-x
Hypervisor vendor: Microsoft
Virtualization type: full
L1d cache: 768 KiB (16 instances)
L1i cache: 512 KiB (16 instances)
L2 cache: 32 MiB (16 instances)
L3 cache: 36 MiB (1 instance)
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; Enhanced IBRS
Vulnerability Spec rstack overflow: 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] mypy-extensions==1.0.0
[pip3] numpy==1.24.4
[pip3] onnxruntime==1.16.3
[pip3] torch==2.1.2
[pip3] torchvision==0.15.2a0
[pip3] triton==2.1.0
[conda] blas 1.0 mkl conda-forge
[conda] cudatoolkit 11.8.0 h6a678d5_0
[conda] magma 2.5.4 h6103c52_2 conda-forge
[conda] mkl 2023.1.0 h213fc3f_46344
[conda] mkl-service 2.4.0 py311h5eee18b_1
[conda] mkl_fft 1.3.8 py311h5eee18b_0
[conda] mkl_random 1.2.4 py311hdb19cb5_0
[conda] numpy 1.24.4 pypi_0 pypi
[conda] torch 2.1.2 pypi_0 pypi
[conda] torchvision 0.15.2 cuda118py311h4cc2eb7_0
[conda] triton 2.1.0 pypi_0 pypiROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.3.3
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0 GPU1 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X SYS N/A
GPU1 SYS X 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
🐛 Describe the bug
startup:
DOCKER_BUILDKIT=1 docker build . --target vllm-openai --tag vllm/vllm-openai --build-arg MAX_JOBS=8
docker stop vllm_d
docker rm vllm_d
docker run -d --restart unless-stopped \
--runtime nvidia --gpus all \
--name vllm_d \
-v /home/super/data/models:/workspace/models \
-p 5010:8000 \
--shm-size 10.24g \
--ipc=host \
-e CUDA_VISIBLE_DEVICES=0,1 \
-e NCCL_P2P_DISABLE=1 \
vllm/vllm-openai:latest \
--gpu-memory-utilization 0.7 --trust-remote-code \
--max-model-len 8192 --model /workspace/models/Qwen1.5-7B-Chat \
--served-model-name Qwen1.5-7B-Chat \
--tensor-parallel-size 2 --enforce-eager
docker logs -f vllm_d
container logs:
INFO 03-29 02:06:49 api_server.py:147] vLLM API server version 0.3.3
INFO 03-29 02:06:49 api_server.py:148] args: Namespace(host=None, port=8000, uvicorn_log_level='info', allow_credentials=False, allowed_origins=['*'], allowed_methods=['*'], allowed_headers=['*'], api_key=None, served_model_name='Qwen1.5-7B-Chat', lora_modules=None, chat_template=None, response_role='assistant', ssl_keyfile=None, ssl_certfile=None, ssl_ca_certs=None, ssl_cert_reqs=0, root_path=None, middleware=[], model='/workspace/models/Qwen1.5-7B-Chat', tokenizer=None, revision=None, code_revision=None, tokenizer_revision=None, tokenizer_mode='auto', trust_remote_code=True, download_dir=None, load_format='auto', dtype='auto', kv_cache_dtype='auto', max_model_len=8192, worker_use_ray=False, pipeline_parallel_size=1, tensor_parallel_size=2, max_parallel_loading_workers=None, ray_workers_use_nsight=False, block_size=16, enable_prefix_caching=False, use_v2_block_manager=False, seed=0, swap_space=4, gpu_memory_utilization=0.7, forced_num_gpu_blocks=None, max_num_batched_tokens=None, max_num_seqs=256, max_logprobs=5, disable_log_stats=False, quantization=None, enforce_eager=True, max_context_len_to_capture=8192, disable_custom_all_reduce=False, tokenizer_pool_size=0, tokenizer_pool_type='ray', tokenizer_pool_extra_config=None, enable_lora=False, max_loras=1, max_lora_rank=16, lora_extra_vocab_size=256, lora_dtype='auto', max_cpu_loras=None, device='auto', image_input_type=None, image_token_id=None, image_input_shape=None, image_feature_size=None, scheduler_delay_factor=0.0, enable_chunked_prefill=False, engine_use_ray=False, disable_log_requests=False, max_log_len=None)
2024-03-29 02:06:51,541 INFO worker.py:1752 -- Started a local Ray instance.
INFO 03-29 02:06:52 llm_engine.py:70] Initializing an LLM engine (v0.3.3) with config: model='/workspace/models/Qwen1.5-7B-Chat', tokenizer='/workspace/models/Qwen1.5-7B-Chat', tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=True, dtype=torch.bfloat16, max_seq_len=8192, download_dir=None, load_format=auto, tensor_parallel_size=2, disable_custom_all_reduce=False, quantization=None, enforce_eager=True, kv_cache_dtype=auto, device_config=cuda, seed=0)
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
WARNING 03-29 02:06:52 llm_engine.py:181] The tokenizer's vocabulary size 151646 does not match the model's vocabulary size 151936. This might cause an error in decoding. Please change config.json to match the tokenizer's vocabulary size.
WARNING 03-29 02:06:54 utils.py:350] Using 'pin_memory=False' as WSL is detected. This may slow down the performance.
INFO 03-29 02:06:54 selector.py:15] Using FlashAttention backend.
(RayWorkerVllm pid=2078) WARNING 03-29 02:06:54 utils.py:350] Using 'pin_memory=False' as WSL is detected. This may slow down the performance.
(RayWorkerVllm pid=2078) INFO 03-29 02:06:55 selector.py:15] Using FlashAttention backend.
INFO 03-29 02:06:55 pynccl_utils.py:42] vLLM is using nccl==2.18.1
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/workspace/vllm/entrypoints/openai/api_server.py", line 156, in <module>
engine = AsyncLLMEngine.from_engine_args(engine_args)
File "/workspace/vllm/engine/async_llm_engine.py", line 344, in from_engine_args
engine = cls(parallel_config.worker_use_ray,
File "/workspace/vllm/engine/async_llm_engine.py", line 310, in __init__
self.engine = self._init_engine(*args, **kwargs)
File "/workspace/vllm/engine/async_llm_engine.py", line 415, in _init_engine
return engine_class(*args, **kwargs)
File "/workspace/vllm/engine/llm_engine.py", line 106, in __init__
self.model_executor = executor_class(model_config, cache_config,
File "/workspace/vllm/executor/ray_gpu_executor.py", line 62, in __init__
self._init_workers_ray(placement_group)
File "/workspace/vllm/executor/ray_gpu_executor.py", line 191, in _init_workers_ray
self._run_workers("init_device")
File "/workspace/vllm/executor/ray_gpu_executor.py", line 324, in _run_workers
driver_worker_output = getattr(self.driver_worker,
File "/workspace/vllm/worker/worker.py", line 100, in init_device
init_distributed_environment(self.parallel_config, self.local_rank,
File "/workspace/vllm/worker/worker.py", line 286, in init_distributed_environment
pynccl_utils.init_process_group(
File "/workspace/vllm/model_executor/parallel_utils/pynccl_utils.py", line 43, in init_process_group
comm = NCCLCommunicator(init_method=init_method,
File "/workspace/vllm/model_executor/parallel_utils/pynccl.py", line 237, in __init__
assert result == 0
AssertionError
(RayWorkerVllm pid=2078) INFO 03-29 02:06:55 pynccl_utils.py:42] vLLM is using nccl==2.18.1
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] Error executing method init_device. This might cause deadlock in distributed execution.
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] Traceback (most recent call last):
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] File "/workspace/vllm/engine/ray_utils.py", line 37, in execute_method
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] return executor(*args, **kwargs)
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] File "/workspace/vllm/worker/worker.py", line 100, in init_device
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] init_distributed_environment(self.parallel_config, self.local_rank,
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] File "/workspace/vllm/worker/worker.py", line 286, in init_distributed_environment
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] pynccl_utils.init_process_group(
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] File "/workspace/vllm/model_executor/parallel_utils/pynccl_utils.py", line 43, in init_process_group
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] comm = NCCLCommunicator(init_method=init_method,
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] File "/workspace/vllm/model_executor/parallel_utils/pynccl.py", line 237, in __init__
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] assert result == 0
(RayWorkerVllm pid=2078) ERROR 03-29 02:06:55 ray_utils.py:44] AssertionError
Please use export NCCL_DEBUG=TRACE
and then run again. It might be your nccl setup problem.
Please use
export NCCL_DEBUG=TRACE
and then run again. It might be your nccl setup problem.
the same error with 'export NCCL_DEBUG=TRACE'. should I add nccl setup into the Dockerfile?
please paste the console output so that we can help you further.
vLLM is using nccl==2.18.1
According to the log, you should have a nccl
library, but the setup might be problematic.
Sorry, this is bug of WSL2. after migrate to Ubuntu, all is OK! Thank you for such a powerful inference engine!
wjw-gpu:121572:121572 [0] NCCL INFO NET/Plugin : Plugin load (libnccl-net.so) returned 2 : libnccl-net.so: cannot open shared object file: No such file or directory wjw-gpu:121572:121572 [0] NCCL INFO NET/Plugin : No plugin found, using internal implementation
wjw-gpu:121572:121572 [0] misc/cudawrap.cc:179 NCCL WARN Failed to find CUDA library libcuda.so (NCCL_CUDA_PATH='') : libcuda.so: cannot open shared object file: No such file or directory NCCL version 2.18.1+cuda12.1 wjw-gpu:121572:123489 [0] NCCL INFO Failed to open libibverbs.so[.1] wjw-gpu:121572:123489 [0] NCCL INFO NET/Socket : Using [0]eth0:172.29.25.108<0> wjw-gpu:121572:123489 [0] NCCL INFO Using network Socket wjw-gpu:121572:123489 [0] NCCL INFO Channel 00/02 : 0 1 wjw-gpu:121572:123489 [0] NCCL INFO Channel 01/02 : 0 1 wjw-gpu:121572:123489 [0] NCCL INFO Trees [0] 1/-1/-1->0->-1 [1] 1/-1/-1->0->-1 wjw-gpu:121572:123489 [0] NCCL INFO P2P Chunksize set to 131072 wjw-gpu:121572:123489 [0] NCCL INFO Channel 00 : 0[1000] -> 1[5000] via SHM/direct/direct wjw-gpu:121572:123489 [0] NCCL INFO Channel 01 : 0[1000] -> 1[5000] via SHM/direct/direct wjw-gpu:121572:123489 [0] NCCL INFO Connected all rings wjw-gpu:121572:123489 [0] NCCL INFO Connected all trees wjw-gpu:121572:123489 [0] NCCL INFO threadThresholds 8/8/64 | 16/8/64 | 512 | 512 wjw-gpu:121572:123489 [0] NCCL INFO 2 coll channels, 0 nvls channels, 2 p2p channels, 2 p2p channels per pee
@youkaichao