Skip to content
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

Enable GUI Visualization on Docker with X11 Forwarding #11729

Merged
merged 25 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8b78b95
Adds dependency to ensure that cv2.imshow() functions correctly when …
Jpfonseca May 7, 2024
257f640
Updates checks.py to allow GUI functions like cv2.imshow() when $DISP…
Jpfonseca May 7, 2024
795c7ff
Simplify update
glenn-jocher May 7, 2024
dc471c9
Merge branch 'main' into main
glenn-jocher May 8, 2024
23e41a3
Merge branch 'main' into main
glenn-jocher May 8, 2024
f2db1b9
Added examples for remote visualization in linux environments
Jpfonseca May 8, 2024
cacd301
Update docs/en/guides/docker-quickstart.md
Jpfonseca May 9, 2024
d570922
Addressed documentation comments
Jpfonseca May 9, 2024
cfc1fb6
Merge branch 'main' into main
glenn-jocher May 11, 2024
251b3f5
Merge branch 'main' into main
glenn-jocher May 11, 2024
b0afedb
Merge branch 'main' into main
Burhan-Q May 11, 2024
e371171
Merge branch 'main' into main
glenn-jocher May 12, 2024
53956bf
Merge branch 'main' into main
glenn-jocher May 12, 2024
9b0e50f
Merge branch 'main' into main
glenn-jocher May 13, 2024
17d0f33
Apply suggestions from code review
Jpfonseca May 14, 2024
0f51140
Update the guide
Jpfonseca May 14, 2024
dac6184
Merge branch 'main' into main
Jpfonseca May 14, 2024
f5f010f
Merge branch 'main' into main
glenn-jocher May 15, 2024
d354572
capitalize all text references to Docker
Burhan-Q May 15, 2024
2413e09
reformat citations and links
Burhan-Q May 15, 2024
4831856
fix warning "Revoke access" (not rendering), now not collapsible and …
Burhan-Q May 15, 2024
0ffe8cd
line clean ups
Burhan-Q May 15, 2024
37709db
Reorder sections, add sub-headers, move reference to view images in t…
Burhan-Q May 15, 2024
ae788dd
add external reference links and statement about display server setup
Burhan-Q May 15, 2024
36a7afc
Merge branch 'main' into main
glenn-jocher May 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/Arial.ttf \
RUN apt update \
&& apt install --no-install-recommends -y gcc git zip curl htop libgl1 libglib2.0-0 libpython3-dev gnupg g++ libusb-1.0-0

# libsm6 is a requirement needed by libqxcb to create the QT based windows for the visualization of the detected objects.
# To test the support for QT plugins in the container, the environment variable 'QT_DEBUG_PLUGINS=1' can be added using the -e option
RUN apt-get install -y libsm6

# Security updates
# https://security.snyk.io/vuln/SNYK-UBUNTU1804-OPENSSL-3314796
RUN apt upgrade --no-install-recommends -y openssl tar
Expand Down
3 changes: 2 additions & 1 deletion ultralytics/utils/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,8 @@
"""Check if environment supports image displays."""
try:
if LINUX:
assert "DISPLAY" in os.environ and not IS_DOCKER and not IS_COLAB and not IS_KAGGLE
assert not IS_COLAB and not IS_KAGGLE
assert "DISPLAY" in os.environ, "The DISPLAY environment variable isn't set."

Check warning on line 539 in ultralytics/utils/checks.py

View check run for this annotation

Codecov / codecov/patch

ultralytics/utils/checks.py#L538-L539

Added lines #L538 - L539 were not covered by tests
cv2.imshow("test", np.zeros((8, 8, 3), dtype=np.uint8)) # show a small 8-pixel image
cv2.waitKey(1)
cv2.destroyAllWindows()
Expand Down