The error number 219 means:
CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = 219
This indicates an error with OpenGL or DirectX context.
please check if you run into the same issue as cuGraphicsGLRegisterBuffer failed with error(219) gst_eglglessink_cuda_init texture = 1
if still meet the same issue, did you install OpenGL? Could you share the output of
$ dpkg -l | grep -i opengl