Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: update python requirements #680

Merged
merged 1 commit into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM nvidia/cuda:11.8.0-runtime-ubuntu20.04 as base
ARG PYTORCH_VERSION=2.4.0
FROM nvidia/cuda:12.4.0-runtime-ubuntu20.04 as base
ARG PYTORCH_VERSION=2.5.1
ARG PYTHON_VERSION=3.9
ARG CUDA_VERSION=11.8
ARG CUDA_VERSION=12.4
ARG MAMBA_VERSION=23.1.0-1
ARG TARGETPLATFORM

Expand Down Expand Up @@ -36,8 +36,7 @@ RUN case ${TARGETPLATFORM} in \
WORKDIR /root

COPY ./requirements.txt /lightllm/requirements.txt
RUN pip install -r /lightllm/requirements.txt --no-cache-dir --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu118
RUN pip install nvidia-nccl-cu12==2.20.5
RUN pip install -r /lightllm/requirements.txt --no-cache-dir --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu124

COPY . /lightllm
RUN pip install -e /lightllm --no-cache-dir
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ LightLLM is a Python-based LLM (Large Language Model) inference and serving fram

### Requirements

The code has been tested with Pytorch>=1.3, CUDA 11.8, and Python 3.9. To install the necessary dependencies, please refer to the provided **requirements.txt** and follow the instructions as
The code has been tested with Pytorch>=1.3, CUDA 12.4, and Python 3.9. To install the necessary dependencies, please refer to the provided **requirements.txt** and follow the instructions as

~~~shell
# for cuda 11.8
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu118
# this version nccl can support torch cuda graph
pip install nvidia-nccl-cu12==2.20.5
# for cuda 12.4
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu124
~~~

NOTE: If you are using torch with cuda 11.x instead, run `pip install nvidia-nccl-cu12==2.20.5` to support torch cuda graph.

### Container

You can use the official Docker container to run the model more easily. To do this, follow these steps:
Expand Down
9 changes: 4 additions & 5 deletions docs/CN/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,14 @@ Lightllm 是一个纯python开发的推理框架,其中的算子使用triton
$ git clone https://github.com/ModelTC/lightllm.git
$ cd lightllm
$
$ # 安装lightllm的依赖 (cuda 11.8)
$ pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu118
$
$ # 这个版本的 nccl 可以支持 torch cuda graph
$ pip install nvidia-nccl-cu12==2.20.5
$ # 安装lightllm的依赖 (cuda 12.4)
$ pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu124
$
$ # 安装lightllm
$ python setup.py install

NOTE: 如果您出于一些原因使用了cuda 11.x的torch, 请运行 `pip install nvidia-nccl-cu12==2.20.5` 以支持 torch cuda graph.

.. note::

Lightllm 的代码在多种GPU上都进行了测试,包括 V100, A100, A800, 4090, 和 H800。
Expand Down
6 changes: 3 additions & 3 deletions docs/EN/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ You can also install Lightllm from source:
$ cd lightllm
$
$ # Install Lightllm's dependencies
$ pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu118
$
$ pip install nvidia-nccl-cu12==2.20.5
$ pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu124
$
$ # Install Lightllm
$ python setup.py install

NOTE: If you are using torch with cuda 11.x instead, run `pip install nvidia-nccl-cu12==2.20.5` to support torch cuda graph.

.. note::

The Lightllm code has been tested on various GPUs, including V100, A100, A800, 4090, and H800.
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ sentencepiece==0.1.99
setuptools==65.6.3
six==1.16.0
sniffio==1.3.0
sympy==1.12
sympy==1.13.1
sortedcontainers==2.4.0
toolz==0.12.0
torch==2.4.0
torchvision==0.19.0
torch==2.5.1
torchvision==0.20.1
tqdm==4.65.0
transformers==4.45.2
tokenizers==0.20.3
huggingface-hub==0.24.6
triton==3.0.0
triton==3.1.0
urllib3==1.26.16
uvicorn==0.19.0
uvloop==0.17.0
Expand Down
Loading