chore(install\_software.sh): add support for installing python3-pip and checking for existence of obs-backgroundremoval package before installation

build(install\_software.sh): update the script to check if /etc/docker/daemon.json exists before configuring Nvidia container toolkit and restarting docker service
ci(install\_software.sh): add a new section for initializing Docker Swarm and deploying ollama stack using docker stack deploy command.
This commit is contained in:
Digital Studium 2024-03-08 17:45:27 +03:00
parent f83665e777
commit 1df80603e8
1 changed files with 15 additions and 6 deletions

View File

@ -21,10 +21,16 @@ nvidia-container-toolkit `# containers` \
nodejs `# for opencommit` \ nodejs `# for opencommit` \
ffmpeg `# for video` \ ffmpeg `# for video` \
v4l2loopback-dkms `# for obs-studio` \ v4l2loopback-dkms `# for obs-studio` \
obs-studio `# for screen recording` obs-studio `# for screen recording` \
python3-pip `# pip`
if [ ! -f /etc/docker/daemon.json ]
then
sudo nvidia-ctk runtime configure --runtime=docker --set-as-default sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
sudo service docker restart sudo service docker restart
fi
sudo docker swarm init
sudo docker stack deploy -c ollama-stack.yaml ollama sudo docker stack deploy -c ollama-stack.yaml ollama
# this is needed for pavucontrol/docker working not under sudo only # this is needed for pavucontrol/docker working not under sudo only
@ -34,9 +40,12 @@ do
done done
# background removal for obs-studio # background removal for obs-studio
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 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 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 rm -f obs-backgroundremoval-1.1.10-x86_64-linux-gnu.deb
fi
# install opencommit # install opencommit