installation.rst 1.36 KB
Newer Older
Woosuk Kwon's avatar
Woosuk Kwon committed
1
2
3
Installation
============

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CacheFlow is a Python library that includes some C++ and CUDA code.
CacheFlow can run on systems that meet the following requirements:

* 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::
    As of now, CacheFlow does not support CUDA 12.
    If you are using Hopper or Lovelace GPUs, please use CUDA 11.8.

.. tip::
    If you have trouble installing CacheFlow, we recommend using the NVIDIA PyTorch Docker image.

    .. code-block:: console

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

Woosuk Kwon's avatar
Woosuk Kwon committed
24
25
    Inside the Docker container, please execute :code:`pip uninstall torch` before installing CacheFlow.

26
27
28
29
30
31
32
33
34
35
36
37
Install with pip
----------------

You can install CacheFlow using pip:

.. code-block:: console

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

    $ # Install CacheFlow.
38
    $ pip install cacheflow  # This may take 5-10 minutes.
39
40
41
42


.. _build_from_source:

Woosuk Kwon's avatar
Woosuk Kwon committed
43
44
45
Build from source
-----------------

46
47
You can also build and install CacheFlow from source.

Woosuk Kwon's avatar
Woosuk Kwon committed
48
49
.. code-block:: console

50
51
52
    $ git clone https://github.com/WoosukKwon/cacheflow.git
    $ cd cacheflow
    $ pip install -e .  # This may take 5-10 minutes.