You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Doc] Update installation doc for build from source and explain the dependency on torch/cuda version (#3746)
Co-authored-by: Zhuohan Li <zhuohan123@gmail.com>
In order to be performant, vLLM has to compile many cuda kernels. The compilation unfortunately introduces binary incompatibility with other CUDA versions and PyTorch versions, even for the same PyTorch version with different building configurations.
48
42
43
+
Therefore, it is recommended to install vLLM with a **fresh new** conda environment. If either you have a different CUDA version or you want to use an existing PyTorch installation, you need to build vLLM from source. See below for instructions.
49
44
50
45
.. _build_from_source:
51
46
@@ -77,6 +72,20 @@ You can also build and install vLLM from source:
77
72
$ # Use `--ipc=host` to make sure the shared memory is large enough.
78
73
$ docker run --gpus all -it --rm --ipc=host nvcr.io/nvidia/pytorch:23.10-py3
79
74
75
+
If you don't want to use docker, it is recommended to have a full installation of CUDA Toolkit. You can download and install it from `the official website <https://developer.nvidia.com/cuda-toolkit-archive>`_. After installation, set the environment variable `CUDA_HOME` to the installation path of CUDA Toolkit, and make sure that the `nvcc` compiler is in your `PATH`, e.g.:
76
+
77
+
.. code-block:: console
78
+
79
+
$ export CUDA_HOME=/usr/local/cuda
80
+
$ export PATH="${CUDA_HOME}/bin:$PATH"
81
+
82
+
Here is a sanity check to verify that the CUDA Toolkit is correctly installed:
83
+
84
+
.. code-block:: console
85
+
86
+
$ nvcc --version # verify that nvcc is in your PATH
87
+
$ ${CUDA_HOME}/bin/nvcc --version # verify that nvcc is in your CUDA_HOME
88
+
80
89
.. note::
81
90
If you are developing the C++ backend of vLLM, consider building vLLM with
0 commit comments