Shortcuts

Build from source

LMDeploy provides prebuilt package that can be easily installed by pip install lmdeploy.

If you have requests to build lmdeploy from source, please clone lmdeploy repository from GitHub, and follow instructions in next sections

git clone --depth=1 https://github.com/InternLM/lmdeploy

Build in localhost (optional)

Firstly, please make sure gcc version is no less than 9, which can be conformed by gcc --version.

Then, follow the steps below to set up the compilation environment:

  • install the dependent packages:

    pip install -r requirements.txt
    apt-get install rapidjson-dev
    
  • install nccl, and set environment variables:

    export NCCL_ROOT_DIR=/path/to/nccl
    export NCCL_LIBRARIES=/path/to/nccl/lib
    
  • install openmpi from source:

    wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.5.tar.gz
    tar xf openmpi-4.1.5.tar.gz
    cd openmpi-4.1.5
    ./configure --prefix=/usr/local/openmpi
    make -j$(nproc) && make install
    export PATH=$PATH:/usr/local/openmpi/bin
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/openmpi/lib
    
  • build and install lmdeploy libraries:

    # install ninja
    apt install ninja-build
    # the home folder of lmdeploy
    cd lmdeploy
    mkdir build && cd build
    sh ../generate.sh
    ninja -j$(nproc) && ninja install
    
  • install lmdeploy python package:

    cd ..
    pip install -e .
    
Read the Docs v: latest
Versions
latest
stable
v0.4.1
v0.4.0
v0.3.0
v0.2.6
v0.2.5
v0.2.4
v0.2.3
v0.2.2
v0.2.0
v0.1.0
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.