Skip to content

Commit 81ba0ea

Browse files
authored
update docs and reorg /test (#938)
Co-authored-by: baishihao <baishihao@sensetime.com>
1 parent 5033dc2 commit 81ba0ea

103 files changed

Lines changed: 4605 additions & 4581 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docker-publish.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,25 @@ jobs:
9595
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
9696
with:
9797
context: .
98+
file: ./docker/Dockerfile
9899
push: ${{ github.event_name != 'pull_request' }}
99100
tags: ${{ steps.meta.outputs.tags }}
100101
labels: ${{ steps.meta.outputs.labels }}
101102
cache-from: type=gha
102103
cache-to: type=gha,mode=max
103104

105+
# Build and push specific Docker image for deepep
106+
# https://github.com/docker/build-push-action
107+
- name: Build and push deepep Docker image
108+
id: build-and-push-deepep
109+
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
110+
with:
111+
context: .
112+
file: ./docker/Dockerfile.deepep
113+
push: ${{ github.event_name != 'pull_request' }}
114+
tags: ghcr.io/modeltc/lightllm:main-deepep
115+
cache-from: type=gha
116+
cache-to: type=gha,mode=max
104117

105118
# Sign the resulting Docker image digest except on PRs.
106119
# This will only write to the public Rekor transparency log when the Docker

README.md

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div align="center">
22
<picture>
3-
<img alt="LightLLM" src="assets/lightllm.drawio.png" width=90%>
3+
<img alt="LightLLM" src="assets/logo_new.png" width=90%>
44
</picture>
55
</div>
66

@@ -29,8 +29,7 @@ LightLLM is a Python-based LLM (Large Language Model) inference and serving fram
2929

3030
- [Install LightLLM](https://lightllm-en.readthedocs.io/en/latest/getting_started/installation.html)
3131
- [Quick Start](https://lightllm-en.readthedocs.io/en/latest/getting_started/quickstart.html)
32-
- [LLM Service](https://lightllm-en.readthedocs.io/en/latest/models/test.html#llama)
33-
- [VLM Service](https://lightllm-en.readthedocs.io/en/latest/models/test.html#llava)
32+
- [TuTorial](https://lightllm-en.readthedocs.io/en/latest/tutorial/)
3433

3534

3635
## Performance
@@ -45,23 +44,8 @@ Please refer to the [FAQ](https://lightllm-en.readthedocs.io/en/latest/faq.html)
4544

4645
We welcome any coopoeration and contribution. If there is a project requires LightLLM's support, please contact us via email or create a pull request.
4746

48-
49-
1. <details><summary> <b><a href=https://github.com/LazyAGI/LazyLLM>LazyLLM</a></b>: Easyest and lazyest way for building multi-agent LLMs applications.</summary>
50-
51-
Once you have installed `lightllm` and `lazyllm`, and then you can use the following code to build your own chatbot:
52-
53-
~~~python
54-
from lazyllm import TrainableModule, deploy, WebModule
55-
# Model will be download automatically if you have an internet connection
56-
m = TrainableModule('internlm2-chat-7b').deploy_method(deploy.lightllm)
57-
WebModule(m).start().wait()
58-
~~~
59-
60-
Documents: https://lazyllm.readthedocs.io/
61-
62-
</details>
63-
6447
Projects based on LightLLM or referenced LightLLM components:
48+
- [LazyLLM](https://github.com/LazyAGI/LazyLLM)
6549
- [LoongServe, Peking University](https://github.com/LoongServe/LoongServe)
6650
- [OmniKV, Ant Group](https://github.com/antgroup/OmniKV)
6751
- [vLLM](https://github.com/vllm-project/vllm) (some LightLLM's kernel used)

assets/logo_new.png

377 KB
Loading

build_and_upload_docker.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,9 @@ fi
1717
IMAGE_TAG=$2
1818
ACCOUNT=$1
1919
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin $ACCOUNT.dkr.ecr.us-west-2.amazonaws.com
20-
DOCKER_BUILDKIT=1 docker build -t $ACCOUNT.dkr.ecr.us-west-2.amazonaws.com/lightllm:$IMAGE_TAG .
20+
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile $ACCOUNT.dkr.ecr.us-west-2.amazonaws.com/lightllm:$IMAGE_TAG .
2121
docker push $ACCOUNT.dkr.ecr.us-west-2.amazonaws.com/lightllm:$IMAGE_TAG
22+
23+
#deepep
24+
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile.deepep -t $ACCOUNT.dkr.ecr.us-west-2.amazonaws.com/lightllm:$IMAGE_TAG-deepep .
25+
docker push $ACCOUNT.dkr.ecr.us-west-2.amazonaws.com/lightllm:$IMAGE_TAG-deepep
File renamed without changes.

docker/Dockerfile.deepep

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
FROM nvcr.io/nvidia/tritonserver:24.04-py3-min as base
2+
ARG PYTORCH_VERSION=2.6.0
3+
ARG PYTHON_VERSION=3.9
4+
ARG CUDA_VERSION=12.4
5+
ARG MAMBA_VERSION=23.1.0-1
6+
ARG TARGETPLATFORM
7+
8+
ENV PATH=/opt/conda/bin:$PATH \
9+
CONDA_PREFIX=/opt/conda
10+
11+
RUN chmod 777 -R /tmp && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
12+
ca-certificates \
13+
libssl-dev \
14+
curl \
15+
g++ \
16+
make \
17+
git && \
18+
rm -rf /var/lib/apt/lists/*
19+
20+
ENV http_proxy=http://devsft:d0663c03baee@10.119.176.202:3128
21+
ENV https_proxy=http://devsft:d0663c03baee@10.119.176.202:3128
22+
RUN case ${TARGETPLATFORM} in \
23+
"linux/arm64") MAMBA_ARCH=aarch64 ;; \
24+
*) MAMBA_ARCH=x86_64 ;; \
25+
esac && \
26+
curl -fsSL -o ~/mambaforge.sh -v "https://github.com/conda-forge/miniforge/releases/download/${MAMBA_VERSION}/Mambaforge-${MAMBA_VERSION}-Linux-${MAMBA_ARCH}.sh" && \
27+
bash ~/mambaforge.sh -b -p /opt/conda && \
28+
rm ~/mambaforge.sh
29+
30+
RUN case ${TARGETPLATFORM} in \
31+
"linux/arm64") exit 1 ;; \
32+
*) /opt/conda/bin/conda update -y conda && \
33+
/opt/conda/bin/conda install -y "python=${PYTHON_VERSION}" ;; \
34+
esac && \
35+
/opt/conda/bin/conda clean -ya
36+
37+
38+
WORKDIR /root
39+
40+
COPY ./requirements.txt /lightllm/requirements.txt
41+
RUN pip install -r /lightllm/requirements.txt --no-cache-dir --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu124
42+
43+
RUN pip install --no-cache-dir nvidia-nccl-cu12==2.25.1 # for allreduce hang issues in multinode H100
44+
45+
RUN git clone https://github.com/Dao-AILab/flash-attention.git -b v2.7.4.post1
46+
RUN cd flash-attention/hopper && FLASH_ATTN_CUDA_ARCHS=90 NVCC_THREADS=128 python setup.py install
47+
48+
RUN git clone --recursive https://github.com/deepseek-ai/DeepGEMM.git
49+
RUN cd DeepGEMM && python setup.py install
50+
51+
WORKDIR /root
52+
RUN git clone https://github.com/deepseek-ai/DeepEP.git
53+
54+
# NVSHMEM
55+
RUN wget https://developer.download.nvidia.com/compute/redist/nvshmem/3.2.5/source/nvshmem_src_3.2.5-1.txz
56+
RUN tar -xf nvshmem_src_3.2.5-1.txz \
57+
&& mv nvshmem_src nvshmem
58+
59+
WORKDIR /root/nvshmem
60+
RUN git apply /root/DeepEP/third-party/nvshmem.patch
61+
62+
WORKDIR /root/nvshmem
63+
ENV CUDA_HOME=/usr/local/cuda
64+
RUN NVSHMEM_SHMEM_SUPPORT=0 \
65+
NVSHMEM_UCX_SUPPORT=0 \
66+
NVSHMEM_USE_NCCL=0 \
67+
NVSHMEM_MPI_SUPPORT=0 \
68+
NVSHMEM_IBGDA_SUPPORT=1 \
69+
NVSHMEM_PMIX_SUPPORT=0 \
70+
NVSHMEM_TIMEOUT_DEVICE_POLLING=0 \
71+
NVSHMEM_USE_GDRCOPY=1 \
72+
cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX=/root/nvshmem/install -DCMAKE_CUDA_ARCHITECTURES=90 -DMLX5_lib=/usr/lib/x86_64-linux-gnu/libmlx5.so.1 \
73+
&& cd build \
74+
&& make install -j64
75+
76+
WORKDIR /root/DeepEP
77+
ENV NVSHMEM_DIR=/root/nvshmem/install
78+
RUN NVSHMEM_DIR=/root/nvshmem/install python setup.py install
79+
80+
COPY . /lightllm
81+
RUN pip install -e /lightllm --no-cache-dir

0 commit comments

Comments
 (0)