fix cv2 import in CI by installing the OpenCV shared libraries
The opencv-python wheel links against libGL at import time, so pytest failed at collection with ImportError: libGL.so.1 on the runner image. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JPUZks9z3Pi5oxw9GQ9znt
This commit is contained in:
@@ -36,6 +36,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# The opencv-python wheel links against libGL at import time, so cv2
|
||||||
|
# cannot even be imported on the bare runner image.
|
||||||
|
- name: Install the OpenCV shared libraries
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends libgl1 libglib2.0-0
|
||||||
|
|
||||||
- uses: astral-sh/setup-uv@v5
|
- uses: astral-sh/setup-uv@v5
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
|
|||||||
Reference in New Issue
Block a user