From 1df80603e8edc1be13529024ced9dbab962b5d33 Mon Sep 17 00:00:00 2001 From: Digital Studium Date: Fri, 8 Mar 2024 17:45:27 +0300 Subject: [PATCH] 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. --- install_software.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/install_software.sh b/install_software.sh index c9676c3..19f3c48 100755 --- a/install_software.sh +++ b/install_software.sh @@ -21,10 +21,16 @@ nvidia-container-toolkit `# containers` \ nodejs `# for opencommit` \ ffmpeg `# for video` \ v4l2loopback-dkms `# for obs-studio` \ -obs-studio `# for screen recording` +obs-studio `# for screen recording` \ +python3-pip `# pip` -sudo nvidia-ctk runtime configure --runtime=docker --set-as-default -sudo service docker restart +if [ ! -f /etc/docker/daemon.json ] +then + sudo nvidia-ctk runtime configure --runtime=docker --set-as-default + sudo service docker restart +fi + +sudo docker swarm init sudo docker stack deploy -c ollama-stack.yaml ollama # this is needed for pavucontrol/docker working not under sudo only @@ -34,9 +40,12 @@ do done # background removal for obs-studio -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 +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 # install opencommit