View setup.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this playbook with ansible-playbook -i inventory setup.yml | |
# In the inventory file, create a group named [rpi] with all the Pis in it | |
--- | |
- hosts: rpi | |
become: true | |
vars: | |
lcd_library_repo: 'https://github.com/geerlingguy/SKU_RM0004.git' | |
lcd_library_version: 'jeff-custom' |
View handbrake-batch.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script requires HandBrakeCLI. On macOS, at least, you need to download | |
# and install it separately from Handbrake. | |
# | |
# See: https://handbrake.fr/downloads2.php | |
if [ -z "$1" ] ; then | |
TRANSCODEDIR="." | |
else |
View cache-purge.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: webserver | |
become: true | |
gather_facts: false | |
vars: | |
# API token should be created with cache_purge permissions. | |
cloudflare_purge_zone: [zone id from cloudflare] | |
cloudflare_purge_token: "{{ lookup('env','CLOUDFLARE_PURGE_TOKEN') }}" | |
cloudflare_purge_body: |
View stable-diffusion-webui-on-ubuntu.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First install Docker and docker-compose following this guide: | |
# https://docs.docker.com/engine/install/ubuntu/ | |
# | |
# Make sure you add your user to the `docker` group: | |
sudo usermod -aG docker $USER | |
# ...then log out and log back in to make that take effect. (I actually had to reboot, le sigh) | |
# Second install the NVIDIA Container Toolkit following this guide: | |
# https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#setting-up-nvidia-container-toolkit |
View stable-diffusion-ubuntu-2204-nvidia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: This will only work on (which?) GPUs. | |
# Install Conda (latest from https://docs.conda.io/en/latest/miniconda.html#linux-installers) | |
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh | |
bash Miniconda3-py39_4.12.0-Linux-x86_64.sh | |
# follow the prompts, restart your Terminal session, and run `conda` to confirm it installed. | |
# Install git and curl, and clone the stable-diffusion repo | |
sudo apt install -y git curl | |
cd Downloads |
View stable-diffusion-ubuntu-2004-amd.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: This will only work on Navi21 GPUs (6800/6900+). | |
# See: https://github.com/RadeonOpenCompute/ROCm/issues/1668#issuecomment-1043994570 | |
# Install Conda (latest from https://docs.conda.io/en/latest/miniconda.html#linux-installers) | |
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh | |
bash Miniconda3-py39_4.12.0-Linux-x86_64.sh | |
# follow the prompts to install it, and run `conda` to make sure it's working. | |
# Install git and curl, and clone the stable-diffusion repo | |
sudo apt install -y git curl |
View arducam-hawk-eye-setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download the pivariety driver install script and make it executable | |
wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh | |
chmod +x install_pivariety_pkgs.sh | |
# Install libcamera dev and apps | |
./install_pivariety_pkgs.sh -p libcamera_dev | |
./install_pivariety_pkgs.sh -p libcamera_apps | |
# Install the Hawk-Eye kernel driver | |
./install_pivariety_pkgs.sh -p 64mp_pi_hawk_eye_kernel_driver |
View cm4-fan.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Jeff Geerling's super-rudimentary fan controller script for the CM4. | |
# | |
# Use: | |
# 1. Download this script to a path like `/opt/cm4-fan.sh` | |
# 2. Run it with: `nohup bash /opt/cm4-fan.sh` | |
# 3. Profit! | |
# | |
# You should wrap it in a systemd unit file if you want it to persist and come |
View photogrammetry.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Photogrammety automation script. | |
# | |
# Based on https://peterfalkingham.com/2018/04/01/colmap-openmvs-scripts-updated/ | |
# Adapted from https://www.instructables.com/Free-Photogrammetry-on-Mac-OS-From-Photos-to-3D-Mo/ | |
# | |
# See full guide on Jeff Geerling's blog: | |
# TODO | |
# | |
# Usage: |
NewerOlder