Error while installing DeepStream SDK on Nvidia T4 in GCP

We are using Nvidia T4 GPU machine with Ubuntu 20.04 LTS to install DeepStream SDK
We are following instruction

• Hardware Platform (Jetson / GPU) → GPU
• DeepStream Version → 6.2
• TensorRT Version → 8.5.2.2
• NVIDIA GPU Driver Version (valid for GPU only) → 525.85.12

After creating VM, we have run the below commands

  1. $sudo apt-get update

  2. Install dependencies
    $ sudo apt install libssl1.1 libgstreamer1.0-0 gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
    gstreamer1.0-libav libgstreamer-plugins-base1.0-dev libgstrtspserver-1.0-0 libjansson4 libyaml-cpp-dev libjsoncpp-dev protobuf-compiler
    gcc make git python3

  3. Install cuda toolkit 11.8
    $ sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
    $ sudo add-apt-repository “deb Index of /compute/cuda/repos/ubuntu2004/x86_64 /”
    $ sudo apt-get update
    $ sudo apt-get install cuda-toolkit-11-8

  4. Install NVIDIA driver 525.85.12
    $wget https://us.download.nvidia.com/tesla/525.85.12/NVIDIA-Linux-x86_64-525.85.12.run
    $sudo pkill -9 Xorg
    $chmod 755 NVIDIA-Linux-x86_64-525.85.12.run
    $sudo ./NVIDIA-Linux-x86_64-525.85.12.run --no-cc-version-check

  5. Install TensorRT 8.5.2.2
    sudo apt-get install libnvinfer8=8.5.2-1+cuda11.8 libnvinfer-plugin8=8.5.2-1+cuda11.8 libnvparsers8=8.5.2-1+cuda11.8
    libnvonnxparsers8=8.5.2-1+cuda11.8 libnvinfer-bin=8.5.2-1+cuda11.8 libnvinfer-dev=8.5.2-1+cuda11.8
    libnvinfer-plugin-dev=8.5.2-1+cuda11.8 libnvparsers-dev=8.5.2-1+cuda11.8 libnvonnxparsers-dev=8.5.2-1+cuda11.8
    libnvinfer-samples=8.5.2-1+cuda11.8 libcudnn8=8.7.0.84-1+cuda11.8 libcudnn8-dev=8.7.0.84-1+cuda11.8
    python3-libnvinfer=8.5.2-1+cuda11.8 python3-libnvinfer-dev=8.5.2-1+cuda11.8

  6. Install librdkafka
    $ git clone GitHub - confluentinc/librdkafka: The Apache Kafka C/C++ library
    $ cd librdkafka
    $ git reset --hard 7101c2310341ab3f4675fc565f64f0967e135a6a
    ./configure
    $ make

We got the Error python not found, then we installed Python using below command
$sudo apt update
$sudo apt install python-is-python3

Again after running the $make command got another error as:
/usr/bin/ld:librdkafka.lds:0: syntax error in VERSION script
collect2: error: ld returned 1 exit status
make[1]: *** […/mklove/Makefile.base:89: librdkafka.so.1] Error 1
make[1]: Leaving directory ‘/home/mastekinnovation/librdkafka/src’
make: *** [Makefile:20: libs] Error 2

Please help with this error

We have Docker image already, you can use this image directly or create new image based on this one, thus avoid installing the packages from scratch.
Python binding can be installed by script in “nvcr.io/nvidia/deepstream:6.2-devel”, docker information can be found here:
DeepStream | NVIDIA NGC

Thanks yingliu, I was able to run DeepStream Container on GCP
I have used the below commands

DeepStream SDK Container Install on GCP

Install Docker Engine on Ubuntu

  1. Update the apt package index and install packages to allow apt to use a repository over HTTPS:
    $ sudo apt-get update
    $ sudo apt-get install ca-certificates curl gnupg

  2. Add Docker’s official GPG key:
    $ sudo install -m 0755 -d /etc/apt/keyrings
    $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    $ sudo chmod a+r /etc/apt/keyrings/docker.gpg

3.Use the following command to set up the repository:
$ echo
“deb [arch=”$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] Index of linux/ubuntu/
“$(. /etc/os-release && echo “$VERSION_CODENAME”)” stable" |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Install Docker Engine

  1. Update the apt package index:
    $ sudo apt-get update

  2. Install Docker Engine, containerd, and Docker Compose.
    $ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

  3. Verify that the Docker Engine installation is successful by running the hello-world image.
    $ sudo docker run hello-world

Linux post-installation steps for Docker Engine

To create the docker group and add your user:

  1. Create the docker group.
    $ sudo groupadd docker

  2. Add your user to the docker group.
    $ sudo usermod -aG docker $USER

3.If you’re running Linux in a virtual machine, it may be necessary to restart the virtual machine for changes to take effect
4.Verify that you can run docker commands without sudo.
$ docker run hello-world

Install nvidia-container-toolkit
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html

The list of prerequisites for running NVIDIA Container Toolkit is described below:
a. GNU/Linux x86_64 with kernel version > 3.10
Command: uname -r
5.15.0-1030-gcp
b. Docker >= 19.03 (recommended, but some distributions may include older versions of Docker. The minimum supported version is 1.12)
Command: sudo docker --version
Docker version 23.0.6, build ef23cbc
c. NVIDIA GPU with Architecture >= Kepler (or compute capability 3.0)
d. NVIDIA Linux drivers >= 418.81.07 (Note that older driver releases or branches are unsupported.)
Command: nvidia-smi
Driver Version: 525.85.12, GPU: Nvidia Tesla T4

  1. Install nvidia-container-toolkit base
    $sudo apt-get update
    $sudo apt-get install -y nvidia-container-toolkit-base

  2. This should include the NVIDIA Container Toolkit CLI (nvidia-ctk) and the version can be confirmed by running:
    Command: $nvidia-ctk –version
    NVIDIA Container Toolkit CLI version 1.13.1
    commit: 28b70663f1a2b982e59e83bcf1844177dc745208

  3. In order to generate a Container Device Interface (CDI) specification that refers to all devices, the following command is used:
    sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml

  4. To check the names of the generated devices the following command can be run:
    sudo grep " name:" /etc/cdi/nvidia.yaml
    Output :name: “0”
    name: all

Get an NGC account and API key:
https://ngc.nvidia.com/setup/api-key
API-Key - XXXX

Pull DeepStream Container Image and run it

  1. $ docker pull nvcr.io/nvidia/deepstream:6.2-devel
  2. $ export DISPLAY=:0
  3. $ distribution=$(. /etc/os-release;echo $ID$VERSION_ID) && curl -s -L https://nvidia.github.io/libnvidia-container/gpgkey | sudo apt-key add - && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
  4. $ sudo apt-get update
  5. $ sudo apt-get install -y nvidia-docker2
  6. $ sudo systemctl restart docker
  7. docker run -it --rm --net=host --gpus all --device /dev/snd -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/deepstream:6.2-devel

Glad to hear that. If there are new problems, please feel free to open a new topic. Thanks

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