2024-03-03 15:34:52 +00:00
|
|
|
#!/bin/bash
|
2024-03-29 04:57:07 +00:00
|
|
|
## for nvidia-container-toolkit
|
|
|
|
#curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
|
|
|
|
# && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
|
|
|
|
# sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
|
|
|
|
# sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
|
|
|
|
## obs-studio repo
|
|
|
|
#sudo add-apt-repository ppa:obsproject/obs-studio -y
|
|
|
|
## for tensorrt (remove backgrount in obs)
|
|
|
|
#wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
|
|
|
|
#sudo dpkg -i cuda-keyring_1.1-1_all.deb
|
|
|
|
#rm -f cuda-keyring_1.1-1_all.deb
|
|
|
|
|
2024-03-07 20:34:38 +00:00
|
|
|
# for nodejs/opencommit
|
|
|
|
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
|
|
|
|
|
|
|
|
# apt packages
|
2024-03-03 15:07:29 +00:00
|
|
|
sudo nala update
|
|
|
|
sudo nala install -y \
|
|
|
|
mpv `# for video playing` \
|
|
|
|
sxiv `# for pictures` \
|
2024-03-29 04:57:07 +00:00
|
|
|
chafa `# for pictures` \
|
2024-03-03 15:34:52 +00:00
|
|
|
strace `# for tracing` \
|
2024-03-03 15:09:35 +00:00
|
|
|
docker.io `# containers` \
|
2024-03-07 20:34:38 +00:00
|
|
|
docker-compose `# containers` \
|
2024-03-08 14:36:58 +00:00
|
|
|
nodejs `# for opencommit` \
|
|
|
|
ffmpeg `# for video` \
|
|
|
|
v4l2loopback-dkms `# for obs-studio` \
|
2024-03-08 14:45:27 +00:00
|
|
|
obs-studio `# for screen recording` \
|
2024-04-06 16:00:18 +00:00
|
|
|
peek `# for screen recording` \
|
2024-03-08 15:50:08 +00:00
|
|
|
python3-pip `# pip` \
|
2024-03-08 18:47:40 +00:00
|
|
|
bat \
|
2024-03-09 16:31:40 +00:00
|
|
|
locales \
|
2024-03-16 16:11:30 +00:00
|
|
|
fzf \
|
2024-03-17 08:56:36 +00:00
|
|
|
scrot `# screenshots` \
|
|
|
|
libreadline-dev `# for nnn` \
|
2024-03-17 09:07:45 +00:00
|
|
|
nnn `# nnn is file manager` \
|
|
|
|
pandoc `# pandoc onvers markdown to html` \
|
|
|
|
cutycapt `# for converting html to image` \
|
2024-03-20 17:48:12 +00:00
|
|
|
vifm `# vifm is file manager` \
|
|
|
|
farbfeld `# for sent`
|
2024-03-08 18:47:40 +00:00
|
|
|
|
|
|
|
sudo locale-gen ru_RU
|
|
|
|
sudo locale-gen ru_RU.UTF-8
|
|
|
|
sudo update-locale
|
2024-03-07 20:34:38 +00:00
|
|
|
|
2024-03-08 16:05:19 +00:00
|
|
|
# lf settings
|
|
|
|
sudo cp lf_preview.sh /usr/local/bin
|
|
|
|
cat << 'EOF' > lfrc
|
2024-03-17 04:36:27 +00:00
|
|
|
set sixel true
|
2024-03-08 16:05:19 +00:00
|
|
|
set previewer lf_preview.sh
|
2024-04-01 05:14:21 +00:00
|
|
|
cmd trash %set -f; mv -f $fx ~/.trash/$(basename $fx)-`date +%Y-%m-%d-%H-%M-%S`
|
2024-03-08 16:05:19 +00:00
|
|
|
map <delete> trash
|
|
|
|
map i $batcat --force-colorization $f
|
2024-04-01 05:15:54 +00:00
|
|
|
map g $lazygit
|
2024-03-08 16:05:19 +00:00
|
|
|
map x $$f
|
|
|
|
map o $mimeopen --ask $f
|
2024-03-29 06:38:53 +00:00
|
|
|
map . set hidden!
|
2024-03-08 16:05:19 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
sudo mkdir /etc/lf
|
|
|
|
sudo cp lfrc /etc/lf
|
|
|
|
rm -f lfrc
|
|
|
|
|
2024-03-29 04:57:07 +00:00
|
|
|
#if [ ! -f /etc/docker/daemon.json ]
|
|
|
|
#then
|
|
|
|
# sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
|
|
|
|
# sudo service docker restart
|
|
|
|
#fi
|
2024-03-08 14:45:27 +00:00
|
|
|
|
|
|
|
sudo docker swarm init
|
2024-03-07 20:34:38 +00:00
|
|
|
sudo docker stack deploy -c ollama-stack.yaml ollama
|
2024-03-03 15:07:29 +00:00
|
|
|
|
2024-03-07 20:34:38 +00:00
|
|
|
# this is needed for pavucontrol/docker working not under sudo only
|
|
|
|
for group in audio pulse-access pulse docker
|
2024-03-03 15:07:29 +00:00
|
|
|
do
|
|
|
|
sudo usermod -a -G $group $USER
|
|
|
|
done
|
|
|
|
|
2024-03-08 14:36:58 +00:00
|
|
|
# background removal for obs-studio
|
2024-03-08 14:45:27 +00:00
|
|
|
if [ ! -d /usr/share/obs/obs-plugins/obs-backgroundremoval ]
|
|
|
|
then
|
|
|
|
wget https://github.com/occ-ai/obs-backgroundremoval/releases/download/1.1.10/obs-backgroundremoval-1.1.10-x86_64-linux-gnu.deb
|
|
|
|
sudo apt install -y ./obs-backgroundremoval-1.1.10-x86_64-linux-gnu.deb
|
|
|
|
rm -f obs-backgroundremoval-1.1.10-x86_64-linux-gnu.deb
|
|
|
|
fi
|
2024-03-08 14:36:58 +00:00
|
|
|
|
2024-03-08 15:50:08 +00:00
|
|
|
# install lf
|
|
|
|
if ! command -v lf &> /dev/null
|
|
|
|
then
|
|
|
|
wget https://github.com/gokcehan/lf/releases/download/r31/lf-linux-amd64.tar.gz
|
|
|
|
tar -xvzf lf-linux-amd64.tar.gz
|
|
|
|
sudo mv ./lf /usr/local/bin/
|
|
|
|
rm -f lf-linux-amd64.tar.gz
|
|
|
|
fi
|
2024-03-08 14:36:58 +00:00
|
|
|
|
2024-03-29 04:57:07 +00:00
|
|
|
|
2024-03-17 09:22:42 +00:00
|
|
|
# install lazygit
|
|
|
|
if ! command -v lazygit &> /dev/null
|
|
|
|
then
|
|
|
|
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
|
|
|
|
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
|
|
|
|
tar xf lazygit.tar.gz lazygit
|
|
|
|
sudo install lazygit /usr/local/bin
|
|
|
|
rm -rf ./lazygit*
|
|
|
|
fi
|
|
|
|
|
2024-03-07 20:34:38 +00:00
|
|
|
# install opencommit
|
|
|
|
if ! command -v opencommit &> /dev/null
|
|
|
|
then
|
|
|
|
git clone --depth 1 https://git.digitalstudium.com/digitalstudium/opencommit.git
|
|
|
|
cd opencommit
|
2024-03-07 21:03:54 +00:00
|
|
|
npm run build
|
2024-03-07 20:34:38 +00:00
|
|
|
npm pack
|
|
|
|
sudo npm install -g opencommit-3.0.11.tgz
|
|
|
|
cd -
|
|
|
|
rm -rf opencommit
|
|
|
|
oco config set OCO_AI_PROVIDER=ollama
|
|
|
|
fi
|
|
|
|
|
2024-03-03 15:07:29 +00:00
|
|
|
# install pet
|
|
|
|
if ! command -v pet &> /dev/null
|
|
|
|
then
|
|
|
|
wget https://github.com/knqyf263/pet/releases/download/v0.3.6/pet_0.3.6_linux_amd64.deb
|
|
|
|
sudo apt install -y ./pet_0.3.6_linux_amd64.deb
|
|
|
|
rm -f pet_0.3.6_linux_amd64.deb
|
|
|
|
fi
|
|
|
|
|
2024-03-29 04:57:07 +00:00
|
|
|
# install gui scripts
|
|
|
|
if ! command -v a &> /dev/null
|
|
|
|
then
|
2024-04-13 18:57:11 +00:00
|
|
|
wget https://git.digitalstudium.com/digitalstudium/tui-scripts/releases/download/1.13/tui-scripts_1.13-1.deb
|
|
|
|
sudo apt install -y ./tui-scripts_1.13-1.deb
|
|
|
|
rm -f tui-scripts_1.13-1.deb
|
2024-03-29 04:57:07 +00:00
|
|
|
fi
|
|
|
|
|
2024-03-07 21:33:59 +00:00
|
|
|
# install kubectl
|
|
|
|
if ! command -v kubectl &> /dev/null
|
|
|
|
then
|
|
|
|
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
|
|
|
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
|
|
|
|
rm -f kubectl
|
|
|
|
fi
|
|
|
|
|