#!/bin/bash foxy=$(systemctl show -p ActiveState foxypool.service | sed 's/ActiveState=//g') if [ $foxy = "active" ] then echo "FoxyPool is enabled and running" echo "Disable FoxyPool (needed for update cuda)" sudo systemctl stop foxypool.service sudo systemctl disable foxypool.service touch .foxy fi if [ ! -f /home/wareck/.cuda_install ] then if [ ! -f cuda_12.4.0_550.54.14_linux.run ] then wget wget https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run fi chmod +x cuda_12.4.0_550.54.14_linux.run sudo service lightdm stop touch /home/wareck/.cuda_install sudo init 3 fi echo "Updating ..." sudo rm /tmp/.X1-lock sudo ./cuda_12.4.0_550.54.14_linux.run --silent --driver sudo rm /home/wareck/.cuda_install if [ -f .foxy ] then echo "Re-enable FoxyPool:" sudo systemctl start foxypool.service sudo systemctl enable foxypool.service rm .foxy fi echo "Done."