#!/bin/bash

apt update
apt install -y tmux neovim tar psmisc make
#apt install -y ffmpeg

pip install tensorboard timm scikit-learn pynvim build
#pip install torchaudio sentencepiece soundfile 

update-alternatives --install /usr/local/bin/vim vim /usr/bin/nvim 50
update-alternatives --install /usr/local/bin/vi vi /usr/bin/nvim 50

cd /home/ubuntu
wget --no-check-certificate https://files.chrishong.dev/tmux.conf
mv tmux.conf .tmux.conf
wget --no-check-certificate https://files.chrishong.dev/ipsed
mv ipsed /usr/local/bin/ipsed

wget --no-check-certificate https://files.chrishong.dev/root_ca.crt
mv root_ca.crt /usr/local/share/ca-certificates
update-ca-certificates

#curl https://ewr1.vultrobjects.com/c5f936d2-dbcf-496f-9baf-5b7f321128ba/imagenet.tar | tar xf
#mkdir /home/ubuntu/torchaudio
#cd /home/ubuntu/torchaudio
#wget --no-check-certificate https://files.chrishong.dev/e06949b0b85a485e9f280ea6d19e5492_tokenizer.model

cd /home/ubuntu
git config --global credential.helper store
#git clone https://gitlab.com/chongdl/ctc-finetuning.git
#git clone https://gitlab.com/chongdl/data2vec2.git
#git clone https://gitlab.com/chongdl/chong_fairseq.git
#cd chong_fairseq
#make
#make install
