Skip to content

Commit

Permalink
[Serve] [Docs] Add tip about libGL error in object detection tutori…
Browse files Browse the repository at this point in the history
…al (#40921)

Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
  • Loading branch information
shrekris-anyscale authored Nov 3, 2023
1 parent 82f3662 commit 86e26e0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/source/serve/tutorials/object-detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@ You should see the following logs:
2023-03-08 21:10:21,685 SUCC <string>:93 -- Deployed Serve app successfully.
```

:::{tip}
If running the Serve app raises an error similar to

```
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
```

then in your Ray cluster, try running

```
pip uninstall opencv-python; pip install opencv-python-headless
```

This error usually occurs when running `opencv-python` (an image recognition library used in this example) on a headless environment, such as a container. This environment may lack dependencies that `opencv-python` needs. `opencv-python-headless` has fewer external dependencies and is tailored to headless environments.
:::

Use the following code to send requests:
```python
import requests
Expand Down

0 comments on commit 86e26e0

Please sign in to comment.