NVIDIA / object-detection-tensorrt-example

Running object detection on a webcam feed using TensorRT on NVIDIA GPUs in Python.
211 stars 61 forks source link

PyCUDA ERROR: The context stack was not empty upon module cleanup. #3

Closed kartoshhka closed 5 years ago

kartoshhka commented 5 years ago

Hello! I ran the script ./setup_environment.sh and it successfully built the TensorRT container.

Then I tried to run detect_objects_webcam.py, but got this PyCUDA error: изображение As you can see, the program even started detecting some objects, but then interrupted.

Could you please help to solve this?

(PS: Ubuntu 18.04 and CUDA 10.1)

kartoshhka commented 5 years ago

Ok, it seems program can't connect to X11.

adrianosantospb commented 5 years ago

Ok, it seems program can't connect to X11.

How do you solve this?

kartoshhka commented 5 years ago

@adrianosantospb I ran it on the server, so in my case program just didn't see any display. To solve this I added X11 forwarding settings on server.

adrianosantospb commented 5 years ago

How did you do?

kartoshhka commented 5 years ago

@adrianosantospb On the server (my was Ubuntu 18.04): in file /etc/ssh/sshd_config uncomment lines:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

then restart the service:

systemctl restart sshd.service

On the client machine (my is Ubuntu 16.04): Connect to server with -X attribute:

ssh -X remoteuser@remotehost

and try to launch any desktop program, e.g.:

gedit

Siddhu68825 commented 3 years ago

I am too facing same issue. After uncommenting the lines of X11, same issue. Can any one suggest me a solution for this. Thanks in advance.

rgwangcn commented 3 years ago

I have the same problem in pycuda, waiting for solution