I’m running an application from within a container which should export and gtk window to display a video. But on my laptop it fails with:
* Errno 111: Connection refused
* Error location: /src/darknet/src-lib/image_opencv.cpp, create_window_cv(), line #231
* Error message: exception caught while creating, moving, or resizing the window "Demo": OpenCV(4.5.4) ./modules/highgui/src/window_gtk.cpp:635: error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem'
I have the same image running fine with the same OS in a desktop and it works. The command I use is:
darknet detector demo ./cfg/coco.data ./cfg/yolov3.cfg ./yolov3.weights test50.mp4 -i 0 -thresh 0.25
The image is run as:
vfbsilva@laptop ~/Source/darknet-alexeyab/darknet $ docker run -v /home/vfbsilva/Source/darknet-alexeyab/darknet/:/darknet -it --ipc=host --rm --gpus all --env DISPLAY=$DISPLAY -v $XAUTHORITY:/tmp/.XAuthority -e XAUTHORITY=/tmp/.XAuthority --volume /tmp/.X11-unix/X0:/tmp/.X11-unix/X0 sherensberk/darknet:2204.550.1241-devel
The difference from the laptop to the dekstop is the laptop has a discrete gpu. So I think docker is messing and trying to connect to the wrong host but nvidia-smi works on the container, So Im clueless