-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Build] Fix Docker for Nuget_Test_Linux_GPU #26492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the Docker base image from Ubuntu 20.04 to Ubuntu 24.04 for GPU package building and testing, ensuring compatibility with modern tooling and dependencies.
Key changes:
- Updated base image from
nvidia/cuda:12.8.1-cudnn-devel-ubuntu20.04tonvidia/cuda:12.8.1-cudnn-devel-ubuntu24.04 - Improved Dockerfile best practices (cleanup, layer optimization, PEP 668 compliance)
- Updated Azure pipeline references to use the new Ubuntu 24.04 Dockerfile
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2404_gpu | Migrated from Ubuntu 20.04 to 24.04, consolidated package installation, added PEP 668 workaround, improved Docker layer cleanup |
| tools/ci_build/github/azure-pipelines/nuget/templates/test_linux.yml | Updated references from Ubuntu 20.04 to 24.04 Dockerfile and base image |
Comments suppressed due to low confidence (2)
tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2404_gpu:32
- Removing the EXTERNALLY-MANAGED file bypasses PEP 668 protections designed to prevent conflicts between system packages and pip-installed packages. Consider using a Python virtual environment or installing packages with 'pip install --user' instead to avoid potential system instability.
tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2404_gpu:63 - The 'chown' operation on line 63 is redundant. The 'adduser' command on line 62 automatically creates the home directory with correct ownership for the new user.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
snnn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going forward we should consider using uv and uv's venv to manage dependencies, then we won't have this global pip installation problem.
|
Example docker: |
tools/ci_build/github/linux/docker/Dockerfile.package_ubuntu_2404_gpu
Outdated
Show resolved
Hide resolved
(1) Not install cudnn9-cuda-12 since the base image has cudnn so no need to install again. (2) Upgrade ubuntu to 24.04 This fixes the following error: ``` microsoft#11 315.1 cudnn9-cuda-12 : Depends: cudnn9-cuda-12-9 (>= 9.10.2.21) but it is not going to be installed microsoft#11 315.1 E: Unable to correct problems, you have held broken packages. ```
(1) Not install cudnn9-cuda-12 since the base image has cudnn so no need to install again.
(2) Upgrade ubuntu to 24.04
This fixes the following error: