1234567891011121314151617181920212223242526272829303132333435 |
- #!/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.3.2_545.23.08_linux.run ]
- then
- wget https://developer.download.nvidia.com/compute/cuda/12.3.2/local_installers/cuda_12.3.2_545.23.08_linux.run
- fi
- chmod +x cuda_12.3.2_545.23.08_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.3.2_545.23.08_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."
|