Last active
August 25, 2020 20:36
-
-
Save rzumer/298bfd8139d9552c686cb706ec7ddf62 to your computer and use it in GitHub Desktop.
Are We Compressed Yet? Worker Deployment Script (for Debian Buster)
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 | |
cd ${HOME} | |
# Initialize work directories | |
mkdir -p awcy/work && mkdir -p awcy/media | |
# Install dependencies | |
sudo apt update | |
sudo apt install -y git rsync bc time dav1d aom-tools \ | |
autoconf libogg-dev libjpeg-dev libpng-dev check \ | |
pkg-config python3-numpy python3-scipy \ | |
meson ninja-build build-essential nasm libtool | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -yq | |
source ~/.cargo/env | |
cd awcy | |
mkdir -p work/daalatool && cd work/daalatool | |
git init . | |
git remote add -t \* -f origin https://gitlab.xiph.org/xiph/daala.git | |
git pull origin master | |
./autogen.sh | |
./configure --disable-unit-tests --disable-player | |
make tools | |
cd .. | |
mkdir -p dump_ciede2000 && cd dump_ciede2000 | |
git init . | |
git remote add -t \* -f origin https://github.com/KyleSiefring/dump_ciede2000.git | |
git pull origin master | |
cargo build --release | |
cd .. | |
mkdir -p vmaf && cd vmaf | |
git init . | |
git remote add -t \* -f origin https://github.com/Netflix/vmaf.git | |
git pull origin master | |
cd libvmaf | |
meson build --buildtype release && cd build | |
ninja | |
# Retrieve any missing media | |
cd ${HOME}/awcy/media | |
wget -A.tar.gz -m -np -nd https://media.xiph.org/sets -e robots=off | |
mv media.xiph.org/sets/*.tar.gz . && rm -r media.xiph.org | |
for filename in *.tar.gz; do | |
tar -xvf $filename | |
rm $filename | |
done | |
# Display additional instructions for work that cannot be automated | |
echo "-------------------" | |
echo "Deployment complete. Complete configuration as follows:" | |
echo "- Include the AWCY host key (awcy.pub) in $HOME/.ssh/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment