[feat] add ascend readme and docker release#8700
Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @pkking, 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!
I've initiated work on adding Docker release capabilities, specifically targeting NPU hardware. This pull request introduces a new Dockerfile that outlines the complete environment setup required to build and run applications on NPU devices, including the installation of various deep learning frameworks and custom kernels. The goal is to streamline the deployment process for NPU-accelerated workloads.
Highlights
- New Dockerfile for NPU Support: I've introduced a new Dockerfile (
docker/Dockerfile.npu) to enable the building and pushing of Docker images tailored for NPU (Neural Processing Unit) hardware. This is a foundational step towards supporting NPU-specific deployments. - Comprehensive NPU Environment Setup: The new Dockerfile sets up a comprehensive environment, including the installation of essential development tools, PyTorch with NPU adapters, vLLM, Triton-Ascend, and SGLang. It also integrates a custom SGLang kernel for NPU, ensuring all necessary dependencies are pre-configured within the image.
- Integration of Custom NPU Kernel: The Dockerfile includes specific steps to clone and build
sgl-kernel-npuand installdeep-ep, which are crucial for leveraging NPU capabilities with SGLang. This ensures that the custom kernel is correctly compiled and linked within the Docker environment.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
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 or fill out our survey to provide feedback.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request introduces a new Dockerfile for NPU hardware. The Dockerfile is functional but has several areas for improvement. My review focuses on a critical security issue regarding hardcoded credentials in URLs, and several medium-severity issues related to Docker best practices for optimizing image size and build efficiency. Specifically, I've suggested removing sensitive credentials, combining multiple RUN instructions for apt and pip commands, and cleaning up cloned git repositories after use. These changes will result in a more secure and leaner Docker image.
|
LGTM |
Signed-off-by: mywaaagh_admin <pkwarcraft@gmail.com>
Signed-off-by: lichaoran <pkwarcraft@gmail.com>
d2b4b13 to
d91192e
Compare
Signed-off-by: mywaaagh_admin <pkwarcraft@gmail.com>
|
lgtm |
|
@iforgetmyname I am using 8 * Ascend 910B to deploy the GLM4.5-Air (106B) model, but it reports OOM, could you help have a check? thanks.
|
let me check it. if you don't use this image, will you also encounter the oom? |
Hey @thincal could you please open an issue here so that we can track it? |
Signed-off-by: mywaaagh_admin <pkwarcraft@gmail.com> Signed-off-by: lichaoran <pkwarcraft@gmail.com> Co-authored-by: Even Zhou <even.y.zhou@outlook.com> Co-authored-by: ronnie_zheng <zl19940307@163.com>
Signed-off-by: mywaaagh_admin <pkwarcraft@gmail.com> Signed-off-by: lichaoran <pkwarcraft@gmail.com> Co-authored-by: Even Zhou <even.y.zhou@outlook.com> Co-authored-by: ronnie_zheng <zl19940307@163.com>
Motivation
In the past, we only had images for GPU and AMD, but this PR would try to build and push docker image for NPU hardware
Modifications
Add two new workflow and NPU related Dockerfile, both docker images will be published to offical registry:
sglang:main-cann8.2.rc1.alpha003-a3sglang:v0.4.10.post1-cann8.2.rc1.alpha003-a3NOTE: we use metadata-action to generate image tags and labels, so the workflow rely on push tag event
FOR END USER
the image name schema:
sglang-{ver|main}-{cann_ver}-{device_type}, the os and python inherit fromcannimage, default to the latestubuntuandpythonversionFOR DEVELOPER
The released image will use the specific sgl-kernel-npu tag, if a new kernel-npu tag is needed, please edit the release docker workflow
Accuracy Test
NO NEED
Benchmark & Profiling
NO NEED
Checklist