Update pyt_wan2.1_inference.ubuntu.amd.Dockerfile - #178
Open
fsavanur wants to merge 2 commits into
Open
Conversation
fsavanur
requested review from
Rohan138,
amathews-amd,
coketaste,
gargrahul and
ppalaniappan-amd
as code owners
July 22, 2026 07:24
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the pyt_wan2.1_inference AMD Ubuntu Dockerfile to fix Docker builds failing on newer Ubuntu images where apt-key is deprecated/removed, by switching ROCm repository key installation to a supported keyring-based approach.
Changes:
- Replace
apt-key addusage with downloading the ROCm GPG key and installing it viagpg --dearmorinto APT’s trusted keyring directory. - Install required tooling (
wget,gnupg,ca-certificates) needed for the new key installation flow.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+56
to
63
| # ROCm gpg key (keyring method — avoids deprecated apt-key / gpg-agent) | ||
| RUN apt-get update && apt-get install -y --no-install-recommends wget gnupg ca-certificates && \ | ||
| rm -rf /var/lib/apt/lists/* && \ | ||
| mkdir -p /etc/apt/trusted.gpg.d && \ | ||
| wget -qO- https://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/rocm.gpg | ||
| RUN apt update && apt install -y \ | ||
| unzip \ | ||
| jq |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
docker/pyt_wan2.1_inference.ubuntu.amd.Dockerfile:63
- Use
apt-get(stable for scripting) and clean APT lists in the same layer when installingunzip/jq. The currentapt update && apt installis less deterministic for non-interactive builds and leaves/var/lib/apt/listsbehind, increasing image size.
wget -qO- https://repo.radeon.com/rocm/rocm.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/rocm.gpg
RUN apt update && apt install -y \
unzip \
jq
leconcio
approved these changes
Jul 23, 2026
leconcio
left a comment
Contributor
There was a problem hiding this comment.
lgtm, instead of the deprecated apt-key add, this saves the key locally using dearmor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The pyt_wan2.1_inference Docker build fails during the step that adds the ROCm APT repository key and installs unzip / jq. The existing Dockerfile uses the deprecated apt-key add flow:
wget ... rocm.gpg.key | sudo apt-key add -
apt-key is deprecated/removed
gpg-agent / keyring handling errors can block the build
The build never reaches later steps (flash-attention, Wan2.1 setup, benchmark run)
This blocks MAD validation for pyt_wan2.1_inference (Wan2.1-T2V-14B text-to-video, perf ID 2a7a4).
This PR fixes the GPG key installation so the Docker image can build and proceed to install required packages.
Technical Details
Replace deprecated apt-key add with the supported APT keyring flow: download https://repo.radeon.com/rocm/rocm.gpg.key, run gpg --dearmor, and write it to /etc/apt/trusted.gpg.d/rocm.gpg.
This avoids Ubuntu 24.04 / headless Docker build failures from apt-key and gpg-agent, so the following apt install unzip jq step can run for pyt_wan2.1_inference.
Tkt: https://amd-hub.atlassian.net/browse/ROCM-26422
Test Result
pyt_wan2.1_inference_pyt_wan2.1_inference.txt
Submission Checklist