Skip to content

Commit e24fb5f

Browse files
committed
ci: restore /usr/local/bin/python symlink overwritten by runner hook
The self-hosted runner's container startup command runs `ln -sf /usr/bin/python3 /usr/local/bin/python`, repointing the image's python3.12 symlink at Debian's PEP-668 externally-managed python3.11. This breaks /usr/local/bin/rocm-smi (shebang #!/usr/local/bin/python -> ModuleNotFoundError: rocm_sdk_core) and any later `python ...` call in the workflow. Restore the symlink to python3.12 as the very first step so subsequent steps see the image's intended interpreter. Signed-off-by: Matthias Gehre <matthias.gehre@amd.com>
1 parent 83d5d47 commit e24fb5f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/build-rocm-wheels.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ jobs:
149149
PYTORCH_INDEX_URL: ${{ github.event.inputs.pytorch_index || 'https://rocm.nightlies.amd.com/v2-staging/gfx1151' }}
150150

151151
steps:
152+
- name: Restore /usr/local/bin/python symlink (overwritten by runner hook)
153+
# The self-hosted runner's container startup command runs
154+
# `ln -sf /usr/bin/python3 /usr/local/bin/python`, repointing
155+
# `python` from the image's python3.12 to Debian's python3.11. This
156+
# breaks /usr/local/bin/rocm-smi (shebang #!/usr/local/bin/python)
157+
# and any later `python ...` invocation in this workflow.
158+
run: ln -sf python3.12 /usr/local/bin/python
159+
152160
- name: Checkout code
153161
uses: actions/checkout@v4
154162

0 commit comments

Comments
 (0)