E539 update from release/1.34 by hjh0119 · Pull Request #1606 · modelscope/modelscope · GitHub
[go: up one dir, main page]

Skip to content

update from release/1.34#1606

Open
hjh0119 wants to merge 9 commits intomodelscope:masterfrom
hjh0119:update_master
Open

update from release/1.34#1606
hjh0119 wants to merge 9 commits intomodelscope:masterfrom
hjh0119:update_master

Conversation

@hjh0119
Copy link
Collaborator
@hjh0119 hjh0119 commented Feb 3, 2026

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @hjh0119, 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 streamlines the Docker image build process by removing the direct installation of Ollama, likely to centralize its management or usage. It also enhances the Ubuntu-based images with Zstandard compression capabilities. A key update is the formal integration of the optimum library, allowing its version to be controlled and installed consistently across different build configurations.

Highlights

  • Ollama Installation Removal: The direct installation of Ollama via its install.sh script has been removed from both Dockerfile.ascend and Dockerfile.ubuntu.
  • Zstandard Library Addition: The Dockerfile.ubuntu now includes zstd and libzstd-dev packages, providing Zstandard compression support.
  • Optimum Library Integration: The optimum library has been integrated into the Docker image build process. This includes adding a --optimum_version argument to build_image.py, setting a default version of '2.0.0', and ensuring its installation via install.sh.

🧠 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
  • docker/Dockerfile.ascend
    • Removed the curl -fsSL https://ollama.com/install.sh | sh command.
  • docker/Dockerfile.ubuntu
    • Added zstd and libzstd-dev to the apt-get install command.
    • Removed the curl -fsSL https://ollama.com/install.sh | sh command.
  • docker/build_image.py
    • Added an init_args method to GPUImageBuilder to set a default optimum_version of '2.0.0'.
    • Included optimum_version in the version_args string for GPUImageBuilder's generate_dockerfile.
    • Added a default optimum_version of '2.0.0' within the general init_args method.
    • Included optimum_version in the version_args string for the general generate_dockerfile.
    • Added --optimum_version as a new argument to the ArgumentParser.
  • docker/install.sh
    • Added optimum_version=${8:-2.0.0} to the script's argument parsing.
    • Included pip install --no-cache-dir optimum==$optimum_version in the installation steps.
Activity
  • No specific activity (comments, reviews, or progress updates) has been recorded for this pull request yet.
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.

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

This pull request updates dependencies and Docker build configurations. The changes are mostly straightforward, but I've found a few areas for improvement. There's some code duplication in docker/build_image.py when setting the default optimum_version, which I've commented on. I also noticed that docker/install.sh now attempts to install the optimum package twice, which should be corrected. Additionally, it appears that SwiftImageBuilder in docker/build_image.py was not updated to pass the new optimum_version argument, which could lead to inconsistencies. While I couldn't comment on that directly as it's outside the diff, it's worth looking into.


pip install --no-cache-dir triton auto-gptq==$autogptq_version -U && pip cache purge

pip install --no-cache-dir optimum==$optimum_version
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The optimum package is already being installed on line 20. This second installation is redundant and may lead to unexpected behavior if versions conflict. Please remove this line.

Comment on lines +94 to 95
RUN pip install --no-cache-dir -U funasr scikit-learn && \
pip install --no-cache-dir -U qwen_vl_utils qwen_omni_utils librosa timm transformers accelerate peft trl safetensors && \
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve readability and reduce the number of shell commands executed in this RUN layer, you can combine these two pip install commands into one.

RUN pip install --no-cache-dir -U funasr scikit-learn qwen_vl_utils qwen_omni_utils librosa timm transformers accelerate peft trl safetensors && \

Comment on lines 60 to 61
pip install --no-cache-dir -U funasr scikit-learn && \
pip install --no-cache-dir -U qwen_vl_utils qwen_omni_utils librosa timm transformers accelerate peft trl safetensors && \
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve readability and reduce the number of shell commands executed in this RUN layer, you can combine these two pip install commands into one.

    pip install --no-cache-dir -U funasr scikit-learn qwen_vl_utils qwen_omni_utils librosa timm transformers accelerate peft trl safetensors && \

Comment on lines +205 to +208
def init_args(self, args) -> Any:
if not args.optimum_version:
args.optimum_version = '2.0.0'
return super().init_args(args)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This logic for setting a default optimum_version is also present in LLMImageBuilder.init_args. To avoid code duplication, consider moving this default setting to the base Builder.init_args method. This would centralize the default version management and improve maintainability.

Comment on lines +296 to +297
if not args.optimum_version:
args.optimum_version = '2.0.0'
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This logic for setting a default optimum_version is also present in the newly added GPUImageBuilder.init_args. To avoid code duplication, consider moving this default setting to the base Builder.init_args method. This would centralize the default version management and improve maintainability.

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.

1 participant

0