Skip to content

Commit 587e0a4

Browse files
author
baishihao
committed
merge main
2 parents 6362c4a + 58b7fd4 commit 587e0a4

File tree

101 files changed

+4639
-4281
lines changed

Some content is hidden

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

101 files changed

+4639
-4281
lines changed

.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/deepseek_deployment.html)
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: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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+
RUN case ${TARGETPLATFORM} in \
21+
"linux/arm64") MAMBA_ARCH=aarch64 ;; \
22+
*) MAMBA_ARCH=x86_64 ;; \
23+
esac && \
24+
curl -fsSL -o ~/mambaforge.sh -v "https://github.com/conda-forge/miniforge/releases/download/${MAMBA_VERSION}/Mambaforge-${MAMBA_VERSION}-Linux-${MAMBA_ARCH}.sh" && \
25+
bash ~/mambaforge.sh -b -p /opt/conda && \
26+
rm ~/mambaforge.sh
27+
28+
RUN case ${TARGETPLATFORM} in \
29+
"linux/arm64") exit 1 ;; \
30+
*) /opt/conda/bin/conda update -y conda && \
31+
/opt/conda/bin/conda install -y "python=${PYTHON_VERSION}" ;; \
32+
esac && \
33+
/opt/conda/bin/conda clean -ya
34+
35+
36+
WORKDIR /root
37+
38+
COPY ./requirements.txt /lightllm/requirements.txt
39+
RUN pip install -r /lightllm/requirements.txt --no-cache-dir --ignore-installed --extra-index-url https://download.pytorch.org/whl/cu124
40+
41+
RUN pip install --no-cache-dir https://github.com/ModelTC/flash-attn-3-build/releases/download/v2.7.4.post1/flash_attn-3.0.0b1-cp39-cp39-linux_x86_64.whl
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 --recursive https://github.com/deepseek-ai/DeepGEMM.git
46+
RUN cd DeepGEMM && python setup.py install
47+
48+
WORKDIR /root
49+
RUN git clone https://github.com/deepseek-ai/DeepEP.git
50+
51+
# NVSHMEM
52+
RUN wget https://developer.download.nvidia.com/compute/redist/nvshmem/3.2.5/source/nvshmem_src_3.2.5-1.txz
53+
RUN tar -xf nvshmem_src_3.2.5-1.txz \
54+
&& mv nvshmem_src nvshmem
55+
56+
WORKDIR /root/nvshmem
57+
RUN git apply /root/DeepEP/third-party/nvshmem.patch
58+
59+
WORKDIR /root/nvshmem
60+
ENV CUDA_HOME=/usr/local/cuda
61+
RUN NVSHMEM_SHMEM_SUPPORT=0 \
62+
NVSHMEM_UCX_SUPPORT=0 \
63+
NVSHMEM_USE_NCCL=0 \
64+
NVSHMEM_MPI_SUPPORT=0 \
65+
NVSHMEM_IBGDA_SUPPORT=1 \
66+
NVSHMEM_PMIX_SUPPORT=0 \
67+
NVSHMEM_TIMEOUT_DEVICE_POLLING=0 \
68+
NVSHMEM_USE_GDRCOPY=1 \
69+
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 \
70+
&& cd build \
71+
&& make install -j64
72+
73+
WORKDIR /root/DeepEP
74+
ENV NVSHMEM_DIR=/root/nvshmem/install
75+
RUN NVSHMEM_DIR=/root/nvshmem/install python setup.py install
76+
77+
COPY . /lightllm
78+
RUN pip install -e /lightllm --no-cache-dir

0 commit comments

Comments
 (0)