Skip to content

Instantly share code, notes, and snippets.

View rgov's full-sized avatar
🤿

Ryan Govostes rgov

🤿
View GitHub Profile
@rgov
rgov / Dockerfile
Created October 16, 2022 18:27
Example of building a custom Ubuntu kernel + metapackages
ARG RELEASE_CODENAME=bionic
ARG KERNEL_VERSION=4.15.0-176-generic
FROM ubuntu:${RELEASE_CODENAME} AS common_deps
# A pecularity of Docker is that we need to repeat args here
ARG RELEASE_CODENAME
# Add source repositories
@rgov
rgov / Dockerfile
Last active December 12, 2022 23:52
Example of using supervisord in a container
FROM debian:buster
# Install system dependencies
RUN apt update \
&& apt install -y \
supervisor \
&& rm -rf /var/lib/apt/lists/*
COPY supervisord.conf /etc/supervisor/supervisord.conf
@rgov
rgov / gist:59a957d9d475a876bb86059c7b8baba3
Created October 5, 2022 16:24
Files in /System/Library on macOS Monterey 12.6 that link to LinkPresentation.framework
% find /System/Library -not -iname '*.*' -exec sh -c 'otool -L {} | sed -e s!^!{}\t!' \; 2>/dev/null | grep LinkPresentation | cut -d $'\t' -f 2-
/System/Library/Messages/iMessageBalloons/MSMessageExtensionBalloonPlugin.bundle/Contents/MacOS/MSMessageExtensionBalloonPlugin
/System/Library/Messages/iMessageBalloons/RichLinkProvider.bundle/Contents/MacOS/RichLinkProvider
(a few extraneous results are omitted from LinkPresentation.framework itself)
@rgov
rgov / Dockerfile
Created September 13, 2022 21:06
Dockerfile starter for WINE + VNC that works with Apple Silicon
# The apt repositories for ARM and Intel/AMD are hosted on different servers
# (ports.ubuntu.com vs archive.ubuntu.com), which requires some finagling to get
# apt's sources correct so we can install i386 packages regardless of our native
# platform.
#
# There are no official i386 containers for Ubuntu 20.04 "Focal" and newer, so
# we assume that we can use the amd64
ARG UBUNTU_VERSION=22.04
FROM --platform=linux/amd64 ubuntu:${UBUNTU_VERSION} AS amd64-base
@rgov
rgov / save_rtsp.py
Created August 25, 2022 02:16
Save an RTSP stream as a ISO BMFF-compliant MPEG-4 file
#!/usr/bin/env python
import argparse
import os
import subprocess
import struct
parser = argparse.ArgumentParser()
parser.add_argument('--output', '-o', type=argparse.FileType('wb'))
parser.add_argument('rtsp_stream')
args = parser.parse_args()
@rgov
rgov / Dockerfile
Last active August 17, 2022 22:57
Unofficial Dockerfile for running Triton Inference Server on a Jetson device
# NOTE:
# There are also base images l4t-ml, l4t-pytorch, etc. that might be better to
# use.
FROM nvcr.io/nvidia/l4t-base:r32.7.1
# Update CA certificates so that we don't get TLS issues downloading from GitHub
RUN apt update \
&& apt install -y \
ca-certificates \
@rgov
rgov / ModelZoo-Status.md
Last active August 17, 2022 14:36
ONNX Model Zoo to TensorFlow Lite conversion status

Report generated at 2022-08-17T07:09:44Z.

Environment

Package Version
Platform macOS-12.5-arm64-arm-64bit
Python 3.10.6 (main, Aug 11 2022, 13:36:31) [Clang 13.1.6 (clang-1316.0.21.2.5)]
onnx 1.12.0
onnx-tf 1.10.0
tensorflow 2.9.0
@rgov
rgov / Dockerfile
Created August 5, 2022 14:38
Dockerfile starter for CentOS 6
FROM centos:6.10
# Switch to using the Vault repos. The upstream image refers to package mirrors
# that no longer exist for this old release of CentOS.
RUN sed -i \
-e '/^mirrorlist/d' \
-e 's|^#baseurl=.*$releasever/|baseurl=http://vault.centos.org/6.10/|' \
/etc/yum.repos.d/CentOS-Base.repo
# Update all base image packages
@rgov
rgov / trace.py
Created April 25, 2022 17:22
trace all the python things
#!/usr/bin/env python3
# why the heck are you crashing suddenly
import datetime
import functools
import threading
import traceback
import os
import signal
import sys
#!/usr/bin/env python3
'''
This is a so-far unsuccessful script for sniffing ROS service calls.
The idea was to republish them as regular messages so they could be recorded to a rosbag.
But I had trouble getting it to work...
'''
import argparse
import io