Hello,
I have a custom Docker image that I built using the base image from DeepStream L4T. The image includes all the necessary dependencies to run my Velocity code.
When my Jetson Nano is connected to a monitor, everything works perfectly. However, when I connect to the system via SSH without a monitor attached, the program fails to run.
Additionally, I am using the following GStreamer pipeline in my Docker image:
gst-launch-1.0 pylonsrc name=pylon-source imageformat="RGB8" pfs-location=PFS/cur.pfs ! videoconvert ! nvvideoconvert ! capsfilter caps="video/x-raw(memory:NVMM),format=(string)NV12" ! nvmuxer.sink_0 nvstreammux name=nvmuxer gpu-id=0 batch-size=1 nvbuf-memory-type=0 live-source=1 width=1920 height=1200 ! nvinfer name=pgie interval=0 config-file-path=/opt/Models/grill/Grill_config.txt unique-id=1 ! queue ! nvinfer config-file-path=/opt/Models/plate/Plate_config.txt process-mode=2 unique-id=2 infer-on-gie-id=1 ! queue ! nvvideoconvert name=elementWithOCRProb ! queue ! nvdsosd process-mode=HW_MODE ! fakesink
This pipeline works flawlessly when a monitor is connected. However, when running in headless mode (no monitor connected), I encounter the following error:
before parse launchNo EGL Display
nvbufsurftransform: Could not get EGL display connection
Could you please advise on what might be causing this issue and how I can resolve it?
Thank you for your assistance!
Hi,
The docker image of DeepStream has settings for display, since it is expected to have display output. You may need to remove the settings about DISPLAY and X11.
I have disabled X11 Forwarding in MobaXterm by unchecking the option, and I also created a new Docker image using the following Dockerfile:
FROM deepstream-pro_2
ENV DISPLAY=
WORKDIR /home/nano/Desktop/executable
CMD ["./Velocity"]
However, the issue persists. Additionally, I am running a script (app_runner.sh) which includes the following commands:
#!/bin/bash
xhost + > /home/nano/output.txt
CONTAINER_NAME=my-c
IMAGE_NAME=deepstream-pro_2_dispayoff
while true; do
sleep 10
# Check if the container is running
if ! sudo docker ps --format '{{.Names}}' | grep -q "^$CONTAINER_NAME$"; then
echo "Starting Docker container: $CONTAINER_NAME"
sudo docker run -it --rm --net=host --runtime nvidia --privileged \
-v /home/nano/Desktop/executable:/home/nano/Desktop/executable \
-v /opt/Models:/opt/Models -v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro -d --name $CONTAINER_NAME $IMAGE_NAME
else
echo "Docker container $CONTAINER_NAME is already running"
fi
# Sleep for a while before checking again
sleep 10
done
Despite these changes, the problem remains unresolved. Could there be another setting or step that I might have missed?
Thanks for your help!
I also tried another solution by building the Docker image with the following Dockerfile:
FROM deepstream-pro_2
RUN apt-get update && apt-get install -y \
x11-apps \
x11-xserver-utils \
xauth \
xfonts-base
ENV DISPLAY=:0
WORKDIR /home/nano/Desktop/executable
CMD ["./Velocity"]
I ran the Docker container using the following command:
sudo docker run -it --rm --net=host --runtime nvidia --privileged \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /home/nano/Desktop/executable:/home/nano/Desktop/executable \
-v /opt/Models:/opt/Models -v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro --name my-c my-deepstream-image-x11
However, this did not resolve the issue either.
Any additional suggestions would be greatly appreciated.
Hi,
Please try other console tool instead of MobaXterm. It seems like it initializes its own display environment and may not work properly. Would suggest use pure-command-line console.