Rate This Document
Findability
Accuracy
Completeness
Readability

Source Code Compilation and Build

Obtain the vLLM source code, build a CUDA wheel from the source package, and install the build product.

  1. Obtain the vLLM 0.18.1 source code.
    1
    git clone --branch v0.18.1 --depth 1 https://github.com/vllm-project/vllm.git
    
  2. Build the CUDA wheel from source code.
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    cd vllm
    export CUDA_HOME=/usr/local/cuda-13.0 
    export PATH=$CUDA_HOME/bin:$PATH
    export LD_LIBRARY_PATH=$CUDA_HOME/lib64:${LD_LIBRARY_PATH:-}
    export VLLM_TARGET_DEVICE=cuda 
    export TORCH_CUDA_ARCH_LIST="8.0"
    export CMAKE_CUDA_ARCHITECTURES=80 
    export MAX_JOBS=8 
    export NVCC_THREADS=1 
    export CMAKE_BUILD_PARALLEL_LEVEL=8 
    python3 -m pip wheel --no-build-isolation --no-deps \
      --wheel-dir /tmp/vllm-build/dist .
    
  3. Install the local build product.
    1
    python3 -m pip install --force-reinstall --no-deps /tmp/vllm-build/dist/vllm-0.18.1+cu130-*.whl
    

    The following is an example of the build product.

    1
    vllm-0.18.1+cu130-cp311-cp311-linux_aarch64.whl