installation.rst 1.38 KB
Newer Older
Zhuohan Li's avatar
Zhuohan Li committed
1
2
.. _installation:

Woosuk Kwon's avatar
Woosuk Kwon committed
3
4
5
Installation
============

6
7
8
9
10
vLLM is a Python library that also contains some C++ and CUDA code.
This additional code requires compilation on the user's machine.

Requirements
------------
11
12
13
14

* OS: Linux
* Python: 3.8 or higher
* CUDA: 11.0 -- 11.8
15
* GPU: compute capability 7.0 or higher (e.g., V100, T4, RTX20xx, A100, L4, etc.)
16
17

.. note::
Woosuk Kwon's avatar
Woosuk Kwon committed
18
    As of now, vLLM does not support CUDA 12.
19
    If you are using Hopper or Lovelace GPUs, please use CUDA 11.8 instead of CUDA 12.
20
21

.. tip::
Woosuk Kwon's avatar
Woosuk Kwon committed
22
    If you have trouble installing vLLM, we recommend using the NVIDIA PyTorch Docker image.
23
24
25

    .. code-block:: console

Woosuk Kwon's avatar
Woosuk Kwon committed
26
        $ # Pull the Docker image with CUDA 11.8.
27
28
        $ docker run --gpus all -it --rm --shm-size=8g nvcr.io/nvidia/pytorch:22.12-py3

Woosuk Kwon's avatar
Woosuk Kwon committed
29
    Inside the Docker container, please execute :code:`pip uninstall torch` before installing vLLM.
Woosuk Kwon's avatar
Woosuk Kwon committed
30

31
32
33
Install with pip
----------------

Woosuk Kwon's avatar
Woosuk Kwon committed
34
You can install vLLM using pip:
35
36
37
38
39
40
41

.. code-block:: console

    $ # (Optional) Create a new conda environment.
    $ conda create -n myenv python=3.8 -y
    $ conda activate myenv

Woosuk Kwon's avatar
Woosuk Kwon committed
42
43
    $ # Install vLLM.
    $ pip install vllm  # This may take 5-10 minutes.
44
45
46
47


.. _build_from_source:

Woosuk Kwon's avatar
Woosuk Kwon committed
48
49
50
Build from source
-----------------

51
You can also build and install vLLM from source:
52

Woosuk Kwon's avatar
Woosuk Kwon committed
53
54
.. code-block:: console

Woosuk Kwon's avatar
Woosuk Kwon committed
55
56
    $ git clone https://github.com/WoosukKwon/vllm.git
    $ cd vllm
57
    $ pip install -e .  # This may take 5-10 minutes.