-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: libGL.so.1: cannot open shared object file: No such file or directory #315
Open
1 of 2 tasks
Labels
bug
Something isn't working
Comments
hvaria
added a commit
to hvaria/inference
that referenced
this issue
Mar 16, 2024
Switching to opencv-python-headless addresses the libGL.so.1 error encountered in headless environments by eliminating the dependency on GUI-related libraries that OpenCV's standard version requires. The headless variant of OpenCV is specifically compiled without these graphical components, making it ideal for server or Docker environments where graphical interfaces are absent. This solution directly tackles the issue by removing the need for the missing libraries, rather than attempting to add unnecessary graphical support to a headless setup. It ensures that applications utilizing OpenCV for image processing or computer vision tasks can operate smoothly without encountering errors related to graphics libraries, thus maintaining functionality while adhering to the constraints of the deployment environment.
I've taken a look and not found an elegant solution for the problem. The PR opened by @hvaria suggest switch to headless opencv for CLI completely. The problems are the following:
We could probably do the following (tradeoffs, pros and cons that I see outlined)
|
I fully agree with your analysis and the outlined approach to navigate these complexities. |
PawelPeczek-Roboflow
added a commit
that referenced
this issue
Mar 21, 2024
Updated requirements.cli.txt to resolve bug #315
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Search before asking
Bug
If you install inside of Docker you need to ensure you have additional dependencies otherwise you get an error.
Ideally we should not require these (I think there's a headless version of cv2 we could use). Alternatively maybe we could catch this error and recommend the solve:
apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
Environment
pytorch/pytorch:2.2.0-cuda12.1-cudnn8-devel
docker with after runningpip install inference-gpu
Minimal Reproducible Example
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: