[Bugfix] Adding mooncake library path to fix error: server failed to start with mooncake connector#6955
[Bugfix] Adding mooncake library path to fix error: server failed to start with mooncake connector#6955wjunLu wants to merge 1 commit intovllm-project:mainfrom
server failed to start with mooncake connector#6955Conversation
Signed-off-by: wjunLu <wjunlu217@gmail.com>
|
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical startup failure within Dockerized environments related to the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds /usr/local/lib to LD_LIBRARY_PATH in four Dockerfiles to resolve a runtime error with the mooncake connector. The change is correct in principle. My feedback focuses on making the ENV instruction more robust to avoid potential issues if LD_LIBRARY_PATH is not previously set.
In accordance with the repository's style guide for pull request summaries, I've drafted a suggested title and summary to improve clarity and consistency:
Suggested PR Title:
[CI][BugFix] Add mooncake library path to Docker imagesSuggested PR Summary:
### What this PR does / why we need it?
This pull request fixes an issue where the server fails to start with the mooncake connector due to the mooncake library not being found. This is resolved by adding `/usr/local/lib` to the `LD_LIBRARY_PATH` environment variable in the Docker images. This ensures that the dynamically linked mooncake libraries, which are installed in `/usr/local/lib`, are located by the linker at runtime.
This change is applied to the following Dockerfiles:
- `Dockerfile`
- `Dockerfile.a3`
- `Dockerfile.a3.openEuler`
- `Dockerfile.openEuler`
### Does this PR introduce _any_ user-facing change?
No, this change only affects the build process and runtime environment of the Docker containers.
### How was this patch tested?
The change can be verified by building the Docker images and running the server with the mooncake connector to confirm that the startup error is resolved.| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # To keep mooncake can be found | ||
| ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib |
There was a problem hiding this comment.
While adding /usr/local/lib to LD_LIBRARY_PATH is the correct approach, the current implementation can result in a leading colon (:) if LD_LIBRARY_PATH is not already set. A leading colon in LD_LIBRARY_PATH causes the dynamic linker to search the current working directory, which can be a security risk and may lead to unexpected behavior.
A more robust way to append to LD_LIBRARY_PATH is to use shell parameter expansion to conditionally add the separator. This avoids the leading colon when the variable is initially empty.
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/local/lib
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # To keep mooncake can be found | ||
| ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib |
There was a problem hiding this comment.
While adding /usr/local/lib to LD_LIBRARY_PATH is the correct approach, the current implementation can result in a leading colon (:) if LD_LIBRARY_PATH is not already set. A leading colon in LD_LIBRARY_PATH causes the dynamic linker to search the current working directory, which can be a security risk and may lead to unexpected behavior.
A more robust way to append to LD_LIBRARY_PATH is to use shell parameter expansion to conditionally add the separator. This avoids the leading colon when the variable is initially empty.
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/local/lib
| rm -rf /var/cache/yum/* | ||
|
|
||
| # To keep mooncake can be found | ||
| ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib |
There was a problem hiding this comment.
While adding /usr/local/lib to LD_LIBRARY_PATH is the correct approach, the current implementation can result in a leading colon (:) if LD_LIBRARY_PATH is not already set. A leading colon in LD_LIBRARY_PATH causes the dynamic linker to search the current working directory, which can be a security risk and may lead to unexpected behavior.
A more robust way to append to LD_LIBRARY_PATH is to use shell parameter expansion to conditionally add the separator. This avoids the leading colon when the variable is initially empty.
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/local/lib
| rm -rf /var/cache/yum/* | ||
|
|
||
| # To keep mooncake can be found | ||
| ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib |
There was a problem hiding this comment.
While adding /usr/local/lib to LD_LIBRARY_PATH is the correct approach, the current implementation can result in a leading colon (:) if LD_LIBRARY_PATH is not already set. A leading colon in LD_LIBRARY_PATH causes the dynamic linker to search the current working directory, which can be a security risk and may lead to unexpected behavior.
A more robust way to append to LD_LIBRARY_PATH is to use shell parameter expansion to conditionally add the separator. This avoids the leading colon when the variable is initially empty.
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/local/lib
|
closing cause redundant with #6976 |
What this PR does / why we need it?
This pull request addresses a critical startup failure within Dockerized environments related to the mooncake connector. By explicitly setting the LD_LIBRARY_PATH environment variable in the Dockerfiles, it ensures that the necessary shared libraries for mooncake are correctly located, allowing the server to initialize without errors. This fix is applied consistently across various Dockerfile configurations to provide a robust solution.
Related Issue:
Does this PR introduce any user-facing change?
How was this patch tested?