Skip to content

Instantly share code, notes, and snippets.

@bilalmughal
bilalmughal / ffmpeg_install.sh
Last active March 27, 2024 02:25
A script to compile ffmpeg on redhat & ubuntu based distributions
#!/bin/bash
set -e # Exit on any error
if [ "$EUID" -ne 0 ]; then
echo "This script must be run as root."
exit 1
fi
USR_LOCAL_PREFIX="/usr/local"
HOME_DIR=$HOME
@bilalmughal
bilalmughal / ffmpeg_install_gpu.sh
Last active March 19, 2024 08:03
Install ffmpeg from source on CPU or GPU
#!/bin/bash
set -e # Exit on any error
if [ "$EUID" -ne 0 ]; then
echo "This script must be run as root."
exit 1
fi
DOWNLOAD="wget"
USR_LOCAL_PREFIX="/usr/local"
@bilalmughal
bilalmughal / ec2_graviton_dl_bootstrap.sh
Last active April 10, 2024 19:36
This script automates the setup of an Amazon EC2 Graviton ARM-based instances for deep learning tasks. It takes care of installing essential utilities, setting up latest Nvidia drivers and CUDA 12.2 toolkit and cuDNN library, and build PyTorch from source. The step-by-step guided can be checked here. https://jumpshare.com/blog/deep-learning-on-a…
#!/bin/bash
set -e # Exit on any error
# Check if required arguments are provided
if [ -z "$REGION" ] || [ -z "$SECURITY_GROUPS" ] || [ -z "$KEY_PAIR" ] || [ -z "$SUBNET" ]; then
echo "Error: You must provide REGION, SECURITY_GROUPS, KEY_PAIR, and SUBNET as environment variables."
echo "Example:"
echo " export REGION=us-east-1"
echo " export SECURITY_GROUPS=sg-12345678,sg-87654321"
echo " export KEY_PAIR=my-key-pair"