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

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

Woosuk Kwon's avatar
Woosuk Kwon committed
6
7
vLLM is a Python library that includes some C++ and CUDA code.
vLLM can run on systems that meet the following requirements:
8
9
10
11
12
13
14

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

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

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

    .. code-block:: console

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

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

28
29
30
Install with pip
----------------

Woosuk Kwon's avatar
Woosuk Kwon committed
31
You can install vLLM using pip:
32
33
34
35
36
37
38

.. 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
39
40
    $ # Install vLLM.
    $ pip install vllm  # This may take 5-10 minutes.
41
42
43
44


.. _build_from_source:

Woosuk Kwon's avatar
Woosuk Kwon committed
45
46
47
Build from source
-----------------

Woosuk Kwon's avatar
Woosuk Kwon committed
48
You can also build and install vLLM from source.
49

Woosuk Kwon's avatar
Woosuk Kwon committed
50
51
.. code-block:: console

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