Deepstream-test-1 doesn't run

I’m new to Deepstream and I googled but haven’t found the answer.

• Hardware Platform (Jetson / GPU) : GPU RTX 1050
• DeepStream Version: 6.1
• JetPack Version (valid for Jetson only): No
• TensorRT Version: 8.4.3.1
• NVIDIA GPU Driver Version (valid for GPU only): 510.108.03
• Issue Type( questions, new requirements, bugs): questions
**• How to reproduce the issue ?

I use my dockerfile: (basically, copy from retinanet-examples/extras/deepstream at main · NVIDIA/retinanet-examples · GitHub, with change
deepstream version to 6.1)
This is my dockerfile

# src: https://github.com/NVIDIA/retinanet-examples/blob/main/Dockerfile.deepstream
FROM nvcr.io/nvidia/pytorch:21.12-py3

ARG DEBIAN_FRONTEND=noninteractive
ARG OPENCV_VERSION=4.4.0
ARG DEEPSTREAM_SDK_VERSION=6.1.1
ARG DEEPSTREAM_VERSION=6.1

WORKDIR /opt/
RUN apt-get update && apt-get install -y libssl1.1 \
    libgstreamer1.0-0 gstreamer1.0-tools \
    gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \
    gstreamer1.0-plugins-ugly gstreamer1.0-libav \
    libgstrtspserver-1.0-0 libjansson4 ffmpeg \
    libjson-glib-1.0 libgles2-mesa libgstreamer1.0-dev \
    libgstreamer-plugins-base1.0-dev libjson-glib-dev \
    libgstrtspserver-1.0-dev

# Install pkg config to find ffmpeg
RUN apt-get update -qq  && apt-get install -y autoconf \
    automake \
    build-essential \
    git-core \
    libass-dev \
    libfreetype6-dev \
    libgnutls28-dev \
    libmp3lame-dev \
    libsdl2-dev \
    libtool \
    libva-dev \
    libvdpau-dev \
    libvorbis-dev \
    libxcb1-dev \
    libxcb-shm0-dev \
    libxcb-xfixes0-dev \
    meson \
    ninja-build \
    pkg-config \
    texinfo \
    wget \
    yasm \
    zlib1g-dev

# For decode
WORKDIR /usr/lib/x86_64-linux-gnu
RUN ln -sf libnvcuvid.so.1 libnvcuvid.so
# RUN apt-get install -y libavcodec-dev libavformat-dev libavutil-dev libswscale-dev

WORKDIR /opt/
RUN git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git && \ 
    cd nv-codec-headers && make install && cd .. && \ 
    git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg/ && \ 
    apt-get update && apt-get install -y build-essential yasm libtool libc6 libc6-dev unzip wget libnuma1 libnuma-dev && \ 
    cd ffmpeg && \
    ./configure --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared --disable-x86asm && \ 
    make -j$(nproc) && \
    make install 

# To install Kafka
RUN git clone https://github.com/edenhill/librdkafka.git /librdkafka && \
    cd /librdkafka && ./configure && make -j && make -j install && \
    mkdir -p /opt/nvidia/deepstream/deepstream-6.0/lib && \
    cp /usr/local/lib/librdkafka* /opt/nvidia/deepstream/deepstream-6.0/lib && \
    rm -rf /librdkafka

# To install Deepstream sdk and samples
COPY ./deepstream_sdk_v${DEEPSTREAM_SDK_VERSION}_x86_64.tbz2 /
WORKDIR /   
RUN tar -xvf deepstream_sdk_v${DEEPSTREAM_SDK_VERSION}_x86_64.tbz2
WORKDIR /opt/nvidia/deepstream/deepstream-${DEEPSTREAM_VERSION}
RUN ./install.sh
# conofig files + sample apps
RUN chmod u+x ./sources/tools/nvds_logger/setup_nvds_logger.sh


WORKDIR /workspace/
# ARG USERNAME=thanhnv
# ARG USER_UID=1000
# ARG USER_GID=$USER_UID

# # Create the user
# RUN groupadd --gid $USER_GID $USERNAME \
#     && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
#     #
#     # [Optional] Add sudo support. Omit if you don't need to install software after connecting.
#     && apt-get update \
#     && apt-get install -y sudo \
#     && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
#     && chmod 0440 /etc/sudoers.d/$USERNAME

# # ********************************************************
# # * Anything else you want to do like clean up goes here *
# # ********************************************************

# # [Optional] Set the default user. Omit if you want to keep the default as root.
# USER $USERNAME

Inside docker, I go to this:

/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test1

Run cmd successfully:

make

copy sample_1080p_h264.mp4 to the same folder
the run

deepstream-test1-app sample_1080p_h264.mp4

which show

Now playing: ./sample_1080p_h264.mp4
Running...

But it doesn’t take any memory from gpu → which means it doesn’t run?

I can run other sample deesptream successfully in the same docker container: GitHub - nanmi/YOLOX-deepstream: deploy yolox algorithm use deepstream (with minor change CUDA_VER and OpenCV path in Makefile) GitHub - marcoslucianops/DeepStream-Yolo: NVIDIA DeepStream SDK 6.1.1 / 6.1 / 6.0.1 / 6.0 configuration for YOLO models

I compiled deepstream-app from source as deesptream-test1 to run 2 above samples.

There is deepstream docker container already( DeepStream | NVIDIA NGC), why not use it directly?
deepstream_test1 consume h264 file, you can find the stream samples in samples/streams directory.

1 Like

I use the mentioned container because I want to use pytorch and conda too.

So I installed deepstream from sdk.

I can build and run deepstream-app from sdk successfully.

I just can’t run deepstream-test-1 from sdk.

The video I used is from SDK too.

Anw, following your suggestion, I tried with deepstream container and it run successfully too.

Do you have any idea why building deepstream from sdk doesn’t work as use pre-built deepstream container?

That would be helpfull because it would make dev more flexible.

Thank you,

DeepStream has a lot of dependencies with low-layer modules such as CUDA, cuDNN, tensorrt etc. The Dockerfile “nvcr.io/nvidia/pytorch:21.12-py3” you are using as base may include different version of dependencies, thus may cause deepstream issue.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.