Here’s a simplified version of a Dockerfile:
FROM nvcr.io/nvidia/deepstream:6.4-triton-multiarch
RUN apt update -y && \
apt install -y --no-install-recommends \
python3-pip \
apt-transport-https \
ca-certificates && \
update-ca-certificates
RUN pip install https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/releases/download/v1.1.10/pyds-1.1.10-py3-none-linux_x86_64.whl
# Install necessary packages for building GLib
RUN apt-get update && apt-get install -y \
pkg-config \
python3-dev \
libffi-dev \
libmount-dev \
meson \
ninja-build \
wget
WORKDIR /opt/nvidia/deepstream/deepstream/lib
RUN wget https://github.com/GNOME/glib/archive/refs/tags/2.76.6.tar.gz
RUN tar -xzvf 2.76.6.tar.gz
RUN rm -r glib-2.76.6/subprojects/gvdb
WORKDIR /opt/nvidia/deepstream/deepstream/lib/glib-2.76.6
# Configure the build
RUN meson _build
# Build GLib
RUN ninja -C _build
# Install GLib
RUN ninja -C _build install
ENTRYPOINT ["/bin/sh", "-c" , "/opt/nvidia/deepstream/deepstream-6.4/entrypoint.sh && tail -f /dev/null"]
It installs everything you need to run Deepstream Python examples.
Once the container is instantiated, if you’re attached to it, you can run this command :
pkg-config --modversion glib-2.0
This provides the version of Glib installed for Ubuntu: 2.76.6
Finally, to analyze the installed version of Glib for Python:
python3
import gi
gi.require_version('GLib', '2.0')
from gi.repository import GLib
print(GLib.glib_version)
This indicates that the version is 2.71.3
This version does not allow me to run my Deepstream application without the error :
GLib (gthread-posix.c): Unexpected error from C library during ‘pthread_setspecific’: Invalid argument. Aborting
This error is also apparent when running the deeptream-test1 python sample.
Although it doesn’t prevent this sample from being executed, it does prevent me from executing my own solution. I can’t provide you with my solution publicly because it’s the property of the company I work for.
As this is an error that you already know about from the release notes, I hope I can get a solution from you.
I suppose it’s better to build PyGObject manually, specifying the version of Glib you want, but there’s no documentation providing any instructions.
If you can’t help me, I’ll turn to some contacts we have internally at Nvidia by referring this post.
Thanks in advance