Skip to content

Add mlu dockerfile#569

Merged
helloyongyang merged 4 commits intomainfrom
add_mlu_dockerfile
Dec 4, 2025
Merged

Add mlu dockerfile#569
helloyongyang merged 4 commits intomainfrom
add_mlu_dockerfile

Conversation

@Wq-dd
Copy link
Contributor

@Wq-dd Wq-dd commented Dec 4, 2025

  1. 增加mlu dockerfile
  2. 增加dockerfile保存目录

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Wq-dd, 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!

此拉取请求通过添加一个专用的Dockerfile来引入对Cambricon MLU(机器学习单元)的支持。此外,它还将所有现有的Dockerfile文件重新组织到一个新的 dockerfiles 目录中,从而改进了项目的结构和可维护性。这一更改旨在扩展硬件兼容性并简化Dockerfile的管理。

Highlights

  • 新增MLU Dockerfile支持: 引入了一个新的Dockerfile (dockerfiles/Dockerfile_cambricon_mlu590),旨在为Cambricon MLU (机器学习单元) 硬件提供支持,特别是针对PyTorch环境。
  • Dockerfile目录重组: 将所有现有的Dockerfile文件移动到一个新的 dockerfiles/ 目录中,以提高项目结构清晰度和可维护性。
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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. 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

  1. 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.

@Wq-dd Wq-dd requested a review from helloyongyang December 4, 2025 09:27
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

本次 PR 主要增加了针对寒武纪 MLU 的 Dockerfile,并将所有 Dockerfile 移动到了 dockerfiles 目录下,使项目结构更清晰。

我对新的 dockerfiles/Dockerfile_cambricon_mlu590 文件进行了一些审查,并提出了一些改进建议,主要集中在 Dockerfile 的最佳实践上,例如合并 RUN 指令以减少镜像层数、优化 apt-get 命令等。这些改动有助于减小最终镜像的体积并提高构建效率。

整体来看,这是一个不错的改进,有助于支持新的硬件平台。

Comment on lines +11 to +21
RUN apt install ffmpeg
RUN pip install --no-cache-dir \
ftfy \
imageio \
imageio-ffmpeg \
loguru \
aiohttp \
gguf \
diffusers \
peft==0.17.0 \
transformers==4.57.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

为了减少 Docker 镜像的层数、减小镜像体积并遵循最佳实践,建议将多个 RUN 指令合并。此外,apt install 应替换为 apt-get update && apt-get install -y --no-install-recommends,以确保获取最新的包索引、在非交互式构建中自动确认,并避免安装非必需的推荐包。安装后清理 apt 缓存也是一个好习惯。

RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && \
    pip install --no-cache-dir \
    ftfy \
    imageio \
    imageio-ffmpeg \
    loguru \
    aiohttp \
    gguf \
    diffusers \
    peft==0.17.0 \
    transformers==4.57.1 && \
    rm -rf /var/lib/apt/lists/*

Comment on lines +3 to +4
RUN mkdir /workspace/LightX2V
WORKDIR /workspace/LightX2V
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

WORKDIR 指令会自动创建其指定的目录(如果不存在)。因此,可以省略 RUN mkdir 指令,使 Dockerfile 更简洁。

WORKDIR /workspace/LightX2V

@helloyongyang helloyongyang merged commit 13bba9d into main Dec 4, 2025
2 checks passed
@helloyongyang helloyongyang deleted the add_mlu_dockerfile branch January 7, 2026 10:09
helloyongyang pushed a commit that referenced this pull request Mar 6, 2026
1. 增加mlu dockerfile
2. 增加dockerfile保存目录
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants