[dockerfile]: swich to vllm==0.21.0 - #9
Conversation
Signed-off-by: princepirde <wangzhipeng628@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request migrates the Docker build process from an SGLang-based image to a vLLM-based image. Key changes include updating the base image, implementing a script to filter out SGLang dependencies from requirements.txt, and adding validation checks to ensure a clean vLLM environment. Review feedback suggests streamlining the VLLM_VERSION argument to avoid redundancy and removing an unreachable check for git conflict markers, as the shell is already configured to exit on error.
| ARG BASE_IMAGE=vllm/vllm-openai:v0.21.0 | ||
| FROM ${BASE_IMAGE} | ||
|
|
||
| # ======================================== Arguments ============================================= | ||
|
|
||
| ARG PATCH_VERSION=latest | ||
| ARG MEGATRON_COMMIT=1dcf0dafa884ad52ffb243625717a3471643e087 | ||
| ARG VLLM_VERSION=0.21.0 |
There was a problem hiding this comment.
The VLLM_VERSION is defined twice: once in the default value of BASE_IMAGE and once as a standalone ARG. This redundancy can lead to version mismatches if the base image is overridden but the version argument is not. Consider using VLLM_VERSION to construct the default BASE_IMAGE to ensure consistency.
ARG VLLM_VERSION=0.21.0
ARG BASE_IMAGE=vllm/vllm-openai:v${VLLM_VERSION}
FROM ${BASE_IMAGE}
# ======================================== Arguments =============================================
ARG VLLM_VERSION
| git apply megatron.patch --3way && \ | ||
| if grep -R -n '^<<<<<<< ' .; then \ | ||
| echo "Megatron patch failed to apply cleanly. Please resolve conflicts." && \ | ||
| exit 1; \ | ||
| fi && \ | ||
| rm megatron.patch && \ |
There was a problem hiding this comment.
This check for conflict markers is redundant and unreachable. The SHELL instruction on line 12 enables pipefail and errexit (-e), so the build will fail immediately if git apply returns a non-zero exit code. Additionally, git apply --3way does not leave conflict markers in files upon failure; it simply fails the operation.
git apply megatron.patch --3way && \
rm megatron.patch && \
I guess we need to wait #7 if we want to remove the dependencies from SGLang. But we can add vllm installation first. And after #7 done, we can remove SGLang totally in Dockerfile. |
|
Is there any cuda/pytorch/transformers version conflict between original configuration and what vLLM 0.21.0 needs? |
|
To let training not break, I think should still install sglang with --no-deps for now. |
| RUN pip install tilelang -f https://tile-ai.github.io/whl/nightly/cu128/ | ||
|
|
||
| # TE does not have wheel on cuda 13 yet, thus need to install from source | ||
| RUN if [ "${ENABLE_CUDA_13}" = "1" ]; then \ |
There was a problem hiding this comment.
We need TE, it's a dependency of mcore
So we have better fallback to 0.20.2 ? |
Signed-off-by: princepride <wangzhipeng628@gmail.com>
|
#12 I
Not sure. |
|
#12 I have a follow up PR that fix some problems, please check. |
Purpose
Removed all SGLang-related Docker dependencies and replaced with vllm==0.21.0.
@gcanlin @aoshen02 I don't know how to test it because right now vime is still heavily dependent on SGLang.