Skip to content

Commit 2f359bb

Browse files
Y-T-Gglenn-jocher
andauthored
Fix MacOS torch multiprocessing permission issue (#13709)
* Fix MacOS `torch` multiprocessing permission issue Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> * Update ci-testing.yml Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> --------- Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
1 parent 508cb59 commit 2f359bb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/ci-testing.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ jobs:
7777
fi
7878
uv pip install --system -r requirements.txt $torch --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match
7979
shell: bash # for Windows compatibility
80+
- name: Update macOS security policy
81+
if: runner.os == 'macOS'
82+
run: | # fix occasional torch multiprocessing failure
83+
xattr -dr com.apple.quarantine $(python -c "import torch; import os; print(os.path.dirname(torch.__file__))")
84+
chmod +x $(python -c "import torch; print(torch.__file__.replace('__init__.py', 'bin/torch_shm_manager'))")
8085
- name: Check environment
8186
run: |
8287
yolo checks

0 commit comments

Comments
 (0)