Skip to content

Instantly share code, notes, and snippets.

View robinvanemden's full-sized avatar
🌳
⏩ ⏩

Robin van Emden robinvanemden

🌳
⏩ ⏩
View GitHub Profile
# Install aarch64 cross depedencies based on Jetpack 4.4
# Dependencies require cuda-toolkit-10.2 which isn't installed in nvidia docker container
# It contains cuda-compat instead. However deb files currently depend on cuda-toolkit alone.
# Hence force dpkg configure
RUN wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cross-aarch64_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cudart-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cufft-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cupti-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-curand-cross-aarch64-10-2_10.2.89-1_all.deb && \
@robinvanemden
robinvanemden / httpsnodered.txt
Created August 23, 2023 09:21 — forked from gbrault/httpsnodered.txt
https setting node-red
from http://industrialinternet.co.uk/node-red/adding-https-ssl-to-node-red/
- go to .node-red directory
- create a public directory: mkdir public
- go to public: cd public
- Create a certificate
openssl genrsa -out privatekey.pem 1024
openssl req -new -key privatekey.pem -out private-csr.pem
openssl x509 -req -days 365 -in private-csr.pem -signkey privatekey.pem -out certificate.pem
- cd ..
@robinvanemden
robinvanemden / gist:ddcd99e1484b0350e332e570ac050818
Created August 22, 2023 19:10 — forked from seddonm1/gist:5927db05cb7ad38d98a22674fa82a4c6
How to build onnxruntime on an aarch64 NVIDIA device (like Jetson Orin AGX)
docker run \
--rm \
-it \
-e ONNXRUNTIME_REPO=https://github.com/microsoft/onnxruntime \
-e ONNXRUNTIME_COMMIT=v1.15.1 \
-e BUILD_CONFIG=Release \
-e CMAKE_VERSION=3.26.4 \
-e CPU_ARCHITECTURE=$(uname -m) \
-e CUDA_ARCHITECTURES="70;75;80;86" \
-v /usr/lib/aarch64-linux-gnu/tegra:/usr/lib/aarch64-linux-gnu/tegra:ro \
#!/bin/bash
# run as:
#
# sudo bash -c "$(wget -q -O - https://get.sclbl.net)"
if ! type "killall" >/dev/null 2>&1; then
echo 'Error: The POSIX "killall" command cannot be found. Please install and try again.' >&2
exit 1
fi
#!/bin/bash
# run as:
#
# sudo bash -c "$(wget -q -O - https://bit.ly/3SqXxxA)"
if [ "$(id -u)" -ne 0 ]; then
echo 'Please run as root.' >&2
exit 1
fi
#!/bin/bash
# run as:
#
# sudo bash -c "$(wget -q -O - https://bit.ly/3UYetgs)"
if [ "$(id -u)" -ne 0 ]; then
echo 'Please run as root.' >&2
exit 1
fi
@robinvanemden
robinvanemden / gige_gst_v4l.md
Created September 23, 2022 15:22 — forked from nitheeshkl/gige_gst_v4l.md
Gstreamer pipelines to use GigE cams as webcam for Zoom/Teams/Skype

Using GigE cam as webcam for Zoom/Skype/Teams

TL;DR: Creates a Gstreamer pipeline to read camera frames from a GigE camera, using Aravis library, and publish them as V4l2 camera source, using V4l2loopback, that can be read by video conferencing programs like Zoom/Skype/Teams.

gst-launch-1.0 aravissrc blocksize=5013504 h-binning=1 v-binning=1 ! video/x-bayer,format=rggb,framerate=100/5,width=2448,height=2048 ! bayer2rgb ! video/x-raw,format=RGBx ! videoconvert ! video/x-raw,format=YUY2 !  aspectratiocrop aspect-ratio=16/9 ! videoscale ! video/x-raw,width=1280,height=720 ! queue ! v4l2sink device=/dev/video0

The Basics

@robinvanemden
robinvanemden / gstreamer-tips.md
Created September 1, 2022 11:58 — forked from flufy3d/gstreamer-tips.md
gstreamer remote streaming

simple test

gst-launch-1.0 -v videotestsrc ! video/x-raw,width=1280,height=640 ! glimagesink

streaming mpegts

gst-launch-1.0 -v videotestsrc ! video/x-raw,width=1280,height=640 ! videoconvert ! x264enc key-int-max=12 byte-stream=true ! mpegtsmux ! tcpserversink port=8888 host=0.0.0.0

vlc using tcp://192.168.1.192:8888

#!/bin/bash
#set -e
#trap 'echo " * Script failed with exit code $?"' EXIT
echo ""
echo "==========================================================================="
echo "= Welcome to the Scailable Edge AI Manager installer ="
echo "==========================================================================="
echo ""
@robinvanemden
robinvanemden / minimal_rtsp.c
Created April 30, 2022 12:30
minimal gstreamer rtsp example: retrieve frame, save jpeg
#include <stdio.h>
#include <gst/gst.h>
#include <gst/app/gstappsink.h>
#include <glib.h>
#include <libavcodec/avcodec.h>
#include "stb/stb_image.h"
void minimal_rtsp() {