[Docker] Dockerfile improvements#8761
Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @Swipe4057, 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 updated the Dockerfile to enhance maintainability and ensure better support. This involves upgrading the base Ubuntu image from 22.04 to 24.04, updating the NVIDIA driver to version 570, and streamlining package installations by removing duplicates and consolidating commands.
Highlights
- Base Image Upgrade: The Docker image now uses Ubuntu 24.04 as its base, moving from the previous 22.04 version for improved support and access to newer packages.
- NVIDIA Driver Update: The NVIDIA driver version has been upgraded from nvidia-dkms-550 to nvidia-dkms-570 to support newer CUDA versions.
- Package Installation Consolidation: Duplicate apt and pip package installations have been removed, and remaining installations are consolidated into single, more maintainable commands.
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 makes several good improvements to the Dockerfile, including upgrading to Ubuntu 24.04, updating the NVIDIA driver, and consolidating package installations. The consolidation of apt and pip packages into fewer RUN layers is a great step towards a more optimized and maintainable Docker image.
My review includes a couple of suggestions to further improve the package installation process. One suggestion is to refine the apt-get consolidation to ensure there are no redundant commands or duplicate packages. Another suggestion is to replace the deprecated apt-key with the modern, more secure method for handling repository keys, which is important for compatibility with Ubuntu 24.04.
|
Nice work! Can you refer to https://github.com/sgl-project/sglang/tree/zhyncs/ver May you help add |
|
py3.13 + cu129 for blackwell |
|
@zhyncs I'll take a look soon |
|
@zhyncs I checked and added adaptation for CUINDEX=129. Regarding Python 3.13, according to the release cycle at https://devguide.python.org/versions/, this version is currently not stable and is in the bugfix phase. For this new image with Ubuntu 24.04, Python 3.12.3 is installed by default. I've tested it locally and believe that the stable version 3.12 should be sufficient. |
|
@Swipe4057 @zhyncs - what do you think about having an |
Motivation
This PR aims to improve the Docker image by removing duplicate
aptandpippackage installations, consolidating them for better maintainability. Additionally, it upgrades the base image from Ubuntu 22.04 to Ubuntu 24.04 to ensure better support, security, and access to updated packages. The NVIDIA driver version has also been updated fromnvidia-dkms-550tonvidia-dkms-575to align with the latest stable driver supporting newer CUDA versions (12.6 and 12.9), as per NVIDIA UNIX Drivers.Modifications
aptandpippackage installations in the Dockerfile.nvidia-dkms-550tonvidia-dkms-575.Accuracy Test
N/A – This PR does not modify model-side code or affect model accuracy.
Benchmark & Profiling
N/A – No performance impact is expected from these changes. The server has been tested locally and is functioning correctly.
Checklist