Skip to content

Commit 4807b01

Browse files
committed
Build trt-llm first
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
1 parent 50f9002 commit 4807b01

1 file changed

Lines changed: 24 additions & 24 deletions

File tree

docker/Dockerfile.trtllm_vllm

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,6 @@ ENV VLLM_USE_STANDALONE_COMPILE=0
2121

2222
WORKDIR /opt
2323

24-
##############################################################################
25-
##
26-
## VLLM wheel
27-
##
28-
##############################################################################
29-
30-
FROM base AS vllm_wheel
31-
32-
ARG VLLM_VERSION
33-
ARG MAX_JOBS=4
34-
35-
WORKDIR /src/vllm
36-
37-
# Build vllm
38-
RUN git clone https://github.com/vllm-project/vllm.git . && \
39-
echo "Building vLLM version: $VLLM_VERSION" && \
40-
git checkout $VLLM_VERSION && \
41-
python use_existing_torch.py && \
42-
pip install -r requirements/build.txt && \
43-
sed -i "/xgrammar/d" requirements/common.txt && \
44-
pip wheel --no-deps --no-build-isolation -v .
45-
4624
##############################################################################
4725
##
4826
## TRT-LLM repo
@@ -83,7 +61,7 @@ RUN git clone https://github.com/NVIDIA/TensorRT-LLM.git . && \
8361
##
8462
##############################################################################
8563

86-
FROM vllm_wheel AS trtllm_builder
64+
FROM base AS trtllm_builder
8765

8866
ARG TRT_VER
8967
ARG CUDA_VER
@@ -112,7 +90,7 @@ RUN --mount=type=bind,from=trtllm_repo,source=/src/tensorrt_llm/docker/common,ta
11290
FROM trtllm_builder AS trtllm_wheel
11391

11492
ARG BUILD_WHEEL_ARGS="--clean --trt_root /usr/local/tensorrt --benchmarks"
115-
ARG JOB_COUNT=32
93+
ARG JOB_COUNT=16
11694

11795
WORKDIR /src/tensorrt_llm
11896

@@ -124,6 +102,28 @@ RUN bash docker/common/install_base.sh && \
124102

125103
RUN python3 scripts/build_wheel.py --job_count $JOB_COUNT ${BUILD_WHEEL_ARGS}
126104

105+
##############################################################################
106+
##
107+
## VLLM wheel
108+
##
109+
##############################################################################
110+
111+
FROM trtllm_wheel AS vllm_wheel
112+
113+
ARG VLLM_VERSION
114+
ARG MAX_JOBS=4
115+
116+
WORKDIR /src/vllm
117+
118+
# Build vllm
119+
RUN git clone https://github.com/vllm-project/vllm.git . && \
120+
echo "Building vLLM version: $VLLM_VERSION" && \
121+
git checkout $VLLM_VERSION && \
122+
python use_existing_torch.py && \
123+
pip install -r requirements/build.txt && \
124+
sed -i "/xgrammar/d" requirements/common.txt && \
125+
pip wheel --no-deps --no-build-isolation -v .
126+
127127
##############################################################################
128128
##
129129
## Install TRT-LLM and vLLM

0 commit comments

Comments
 (0)