update_cuda.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. foxy=$(systemctl show -p ActiveState foxypool.service | sed 's/ActiveState=//g')
  3. if [ $foxy = "active" ]
  4. then
  5. echo "FoxyPool is enabled and running"
  6. echo "Disable FoxyPool (needed for update cuda)"
  7. sudo systemctl stop foxypool.service
  8. sudo systemctl disable foxypool.service
  9. touch .foxy
  10. fi
  11. if [ ! -f /home/wareck/.cuda_install ]
  12. then
  13. if [ ! -f cuda_12.4.1_550.54.15_linux.run ]
  14. then
  15. #wget -c https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda_12.4.1_550.54.15_linux.run
  16. wget -c https://developer.download.nvidia.com/compute/cuda/12.6.0/local_installers/cuda_12.6.0_560.28.03_linux.run
  17. fi
  18. #chmod +x cuda_12.4.1_550.54.15_linux.run
  19. chmod +x cuda_12.6.0_560.28.03_linux.run
  20. sudo service lightdm stop
  21. touch /home/wareck/.cuda_install
  22. sudo init 3
  23. fi
  24. echo "Updating ..."
  25. sudo rm /tmp/.X1-lock
  26. #sudo ./cuda_12.4.1_550.54.15_linux.run --silent --driver
  27. sudo ./cuda_12.6.0_560.28.03_linux.run --silent --driver
  28. sudo rm /home/wareck/.cuda_install
  29. if [ -f .foxy ]
  30. then
  31. echo "Re-enable FoxyPool:"
  32. sudo systemctl start foxypool.service
  33. sudo systemctl enable foxypool.service
  34. rm .foxy
  35. fi
  36. echo "Done."