Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Ruturaj4
Copy link
Contributor

@Ruturaj4 Ruturaj4 commented Jul 8, 2025

Fix Docker patch step for ROCm >= 7.0: escape 'purelib' key in sysconfig call

The Docker build fails during the namespace patch step for ROCm >= 7.0 with:

NameError: name 'purelib' is not defined

This is caused by unescaped single quotes around ['purelib'] inside a double-quoted
Python command within bash -c, which Bash misinterprets as a shell variable.

We fix this by switching to a single-quoted Python command and using double quotes
for the dictionary key access:

python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])'

Note: This issue does not occur in CI with ROCm 6.4.1 because the patch step is
only triggered for ROCm versions 7.0 and above.

@gulsumgudukbay gulsumgudukbay self-requested a review July 8, 2025 04:22
@gulsumgudukbay gulsumgudukbay merged commit 863a1b6 into master Jul 8, 2025
7 checks passed
@charleshofer charleshofer deleted the fix_patch_excaping branch July 8, 2025 14:49
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