Skip to content

Update pyt_wan2.1_inference.ubuntu.amd.Dockerfile - #178

Open
fsavanur wants to merge 2 commits into
ROCm:developfrom
fsavanur:develop
Open

Update pyt_wan2.1_inference.ubuntu.amd.Dockerfile#178
fsavanur wants to merge 2 commits into
ROCm:developfrom
fsavanur:develop

Conversation

@fsavanur

@fsavanur fsavanur commented Jul 22, 2026

Copy link
Copy Markdown

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

Copilot AI review requested due to automatic review settings July 22, 2026 07:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 add usage with downloading the ROCm GPG key and installing it via gpg --dearmor into 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 thread docker/pyt_wan2.1_inference.ubuntu.amd.Dockerfile Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

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>
Copilot AI review requested due to automatic review settings July 22, 2026 07:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 installing unzip/jq. The current apt update && apt install is less deterministic for non-interactive builds and leaves /var/lib/apt/lists behind, 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 leconcio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, instead of the deprecated apt-key add, this saves the key locally using dearmor

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.

3 participants