I was recently working with ffmpeg and NVIDIA T4 GPUs on GKE for a encoding pipeline. To get started with GPUs on GKE, the NVIDIA drivers need to be installed on the nodes. After installing, ffmpeg should be able to access NVIDIA GPU capabilities like
A recent task had me taking a look at alternative JSON libraries for the purpose of performance. One of them was python-rapidjson which offered support for SIMD.
To get python-rapidjson to compile with SIMD, we need to define one of the SIMD macros, either
The chosen flag would then need to be passed to pip during install via
CFLAGS. Depending on the flag, you would have to pass some addition options.
One-liner to re-install the currently installed version as the SIMD version.
CFLAGS="-DRAPIDJSON_SSE42=1 -msse4.2" pip -v install -force-reinstall -no-binary python-rapidjson $(pip freeze | grep python-rapidjson)
Many popular apps offer live stream as a feature integration like Twitch and Youtube Live. With the ever increasing users drawn towards video based services, as seen with the trending race to top Youtube subscribed, the technology behind video delivery is equally increasing in importance. …
To use XFS with Persistent Volumes, the host node needs to have the command
xfs_mkfile available so disks can be created and formatted. The problem comes when needing to do this on GKE where there are 2 OSs available,
ubuntu which has
xfsprogs installed by default and
cos which does…
I’ve recently needed to revisit some of our deployments which were created in the earlier days of GKE where some useful features were not available. One component revisited was the disabling the kernel setting Transparent Huge Pages (THP) recommended for mongo and redis.
subPath to copy and mount
I needed access to the kubernetes API from within a pod so that the pod can self label itself.
For example, I am currently working with redis and redis-sentinel. When sentinel triggers a reconfigure script, I want the…
There are some situations where you just need to run a simple single command cronjob. This is where the
alpineDocker image comes in very handy. It comes with a simple yet flexible
cron package via
For very simple stuff, a single command using the default
For more complex crontabs, mount a crontab file!
Compiling your own image with an entrypoint makes it cleaner to run.
Update Sept 6 2017: As of Aug 8 2017, GKE has released the
ubuntu image to replace
container-vm. This image has
xfsprogs pre-installed. Use this instead.
To start streaming camera video, we simply combine
ffmpeg by piping one into another.
raspivid -t 0 -w 1280 -h 720 -fps 25 -g 75 -fl -o - | ffmpeg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -i pipe:0 -c:v copy -c:a aac -strict experimental -f flv -f flv…