I successfully upgraded Ubuntu from version 20.04 LTS to 22.04 LTS, and the issue has disappeared. It appears that the PYDS library (DeepStreamSDK python bindings) has an incompatibility when the host is running Ubuntu 20.04 LTS and the Docker image is based on Ubuntu 22.04.
When using Ubuntu 20.04 on the host and a Docker image with Ubuntu 22.04:
Issue observed: Importing the PYDS library before calling the plugins causes the process to freeze. Additionally, the following message is displayed:
(python3:2651): GStreamer-WARNING **: 13:50:42.846: External plugin loader failed.
This most likely means that the plugin loader helper binary was not found or could not be run.
You might need to set the GST_PLUGIN_SCANNER environment variable if your setup is unusual.
This should normally not be required though.
On the other hand, when using Ubuntu 22.04 both on the host and in the Docker image, the plugins work normally, and the aforementioned warning message disappears.
It seems that the compatibility issue is specifically related to the combination of Ubuntu 20.04 on the host and a Docker image based on Ubuntu 22.04. When both the host and Docker image are on Ubuntu 22.04, everything functions as expected.