Git Product home page Git Product logo

gst_ds_examples's Introduction

Gstreamer Deepstream Examples

My gstreamer and deepstream examples container based on my dockerhub image gst_ds_env

Install Prereqs on Host

  • Note: you may have to reboot a few times

Jetson

First ensure you're on L4T 32.6.X (cat /etc/nv_tegra_release and check REVISION for 6.0 or greater).

Then run

cd host_setup
./first_time_setup.sh
# reboot afterwards

Desktop

Assuming you have a Ubuntu 20.04 Desktop (or 18.04 probably) with an NVIDIA GPU.

Install the recommended nvidia drivers for you GPU using

./host_setup/desktop_scripts/install_nvidia_drivers_desktop.sh
# reboot afterwards 
sudo reboot

Now run the first time setup script:

cd host_setup
./first_time_setup.sh
# reboot afterwards 
sudo reboot

Using the Container

# automatically detect host architecture and nvidia-docker2 package installation
# manual override options:
#   ./build.sh jetson_nogpu  # for example
#    other options: jetson, desktop, desktop_nogpu
# automatic is best for most users:
./build.sh

# start the container
./run.sh

# attach current shell to container.
# you can also install vscode docker extension 
#   then click on extension, right click container and attach vscode window
./attach.sh

# for cleanup you can remove it with
./remove.sh

# forgot to map /dev/video0 into the container in the docker-compose.yaml? 
# No problem just make changes in the file then run 
./deleteRebuildRestart.sh 
# and attach again however you like

Docker Options

Use Local Display

If you're plugged into the device via HDMI and want to display locally then run on your host:

xhost +local:docker

and make sure the container has the same DISPLAY environment variable as your local host (i.e. echo $DISPLAY on your local host. then in your container set it to the same with export DISPLAY=WhateverTheFuckCameOutOfYourLocalHost)

You can now test this out by typing xeyes in the docker container. ( you should see graphics of eyes that follow your mouse now )

Using /dev/video0

in the docker-compose.yaml under volumes make sure to have these uncommented:

  • - /dev/video0:/dev/video0
  • - /tmp/argus_socket:/tmp/argus_socket

also you may need to be priveleged to access the device too so uncomment

  • priveleged: true

now run ./deleteRebuildRestart.sh

Examples

If you have nvidia-docker2 package and GPU installed on your host you should be able to access these examples under

  • /opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/

C Examples:

  • /opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/

Python Exmaples:

  • /opt/nvidia/deepstream/deepstream-6.0/sources/sources/deepstream_python_apps/apps/

Building Other Deepstream in container (Pose Estimation)

First follow the instructions from the "Use Local Display" section above. Now in the container go to

/opt/nvidia/deepstream/deepstream-6.0/sources/apps/sample_apps/deepstream_pose_estimation

and run

./run.sh

(ctrl+c to quit)

gst_ds_examples's People

Contributors

pwolfe8 avatar

Stargazers

 avatar  avatar

Watchers

 avatar Robert Moss avatar

gst_ds_examples's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.