diagnostic_inner.sh 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #!/bin/bash
  2. cd "$(dirname "$0")/.."
  3. echo "Starting diagnostic..." > ./installer_scripts/diagnostic.txt
  4. echo "" >> ./installer_scripts/diagnostic.txt
  5. # Log current time
  6. echo "$(date)" >> ./installer_scripts/diagnostic.txt
  7. echo "" >> ./installer_scripts/diagnostic.txt
  8. echo "CD: $(pwd)" >> ./installer_scripts/diagnostic.txt
  9. echo "" >> ./installer_scripts/diagnostic.txt
  10. echo "which git (before calling activate.sh):" >> ./installer_scripts/diagnostic.txt
  11. which git >> ./installer_scripts/diagnostic.txt 2>&1
  12. echo "" >> ./installer_scripts/diagnostic.txt
  13. echo "which python (before calling activate.sh):" >> ./installer_scripts/diagnostic.txt
  14. which python >> ./installer_scripts/diagnostic.txt 2>&1
  15. echo "" >> ./installer_scripts/diagnostic.txt
  16. echo "which conda (before calling activate.sh):" >> ./installer_scripts/diagnostic.txt
  17. which conda >> ./installer_scripts/diagnostic.txt 2>&1
  18. echo "" >> ./installer_scripts/diagnostic.txt
  19. echo "which node (before calling activate.sh):" >> ./installer_scripts/diagnostic.txt
  20. which node >> ./installer_scripts/diagnostic.txt 2>&1
  21. echo "" >> ./installer_scripts/diagnostic.txt
  22. source "$(dirname "$0")/activate.sh"
  23. echo "" >> ./installer_scripts/diagnostic.txt
  24. echo "which git (after calling activate.sh):" >> ./installer_scripts/diagnostic.txt
  25. which git >> ./installer_scripts/diagnostic.txt 2>&1
  26. echo "" >> ./installer_scripts/diagnostic.txt
  27. echo "which python (after calling activate.sh):" >> ./installer_scripts/diagnostic.txt
  28. which python >> ./installer_scripts/diagnostic.txt 2>&1
  29. echo "" >> ./installer_scripts/diagnostic.txt
  30. echo "which conda (after calling activate.sh):" >> ./installer_scripts/diagnostic.txt
  31. which conda >> ./installer_scripts/diagnostic.txt 2>&1
  32. echo "" >> ./installer_scripts/diagnostic.txt
  33. echo "which node (after calling activate.sh):" >> ./installer_scripts/diagnostic.txt
  34. which node >> ./installer_scripts/diagnostic.txt 2>&1
  35. echo "" >> ./installer_scripts/diagnostic.txt
  36. # Log versions
  37. echo "python --version:" >> ./installer_scripts/diagnostic.txt
  38. python --version >> ./installer_scripts/diagnostic.txt 2>&1
  39. echo "" >> ./installer_scripts/diagnostic.txt
  40. echo "node --version:" >> ./installer_scripts/diagnostic.txt
  41. node --version >> ./installer_scripts/diagnostic.txt 2>&1
  42. echo "" >> ./installer_scripts/diagnostic.txt
  43. echo "conda --version:" >> ./installer_scripts/diagnostic.txt
  44. conda --version >> ./installer_scripts/diagnostic.txt 2>&1
  45. echo "" >> ./installer_scripts/diagnostic.txt
  46. # Git status and log
  47. echo "git status:" >> ./installer_scripts/diagnostic.txt
  48. git status >> ./installer_scripts/diagnostic.txt 2>&1
  49. echo "" >> ./installer_scripts/diagnostic.txt
  50. echo "git log HEAD~1..HEAD:" >> ./installer_scripts/diagnostic.txt
  51. git log HEAD~1..HEAD >> ./installer_scripts/diagnostic.txt 2>&1
  52. echo "" >> ./installer_scripts/diagnostic.txt
  53. # Package managers
  54. echo "pip list:" >> ./installer_scripts/diagnostic.txt
  55. pip list >> ./installer_scripts/diagnostic.txt 2>&1
  56. echo "" >> ./installer_scripts/diagnostic.txt
  57. echo "conda list:" >> ./installer_scripts/diagnostic.txt
  58. conda list >> ./installer_scripts/diagnostic.txt 2>&1
  59. echo "" >> ./installer_scripts/diagnostic.txt
  60. echo "npm list -g:" >> ./installer_scripts/diagnostic.txt
  61. npm list -g >> ./installer_scripts/diagnostic.txt 2>&1
  62. echo "" >> ./installer_scripts/diagnostic.txt
  63. # Core packages
  64. echo "pip show python-dotenv gradio torch torchaudio torchvision:" >> ./installer_scripts/diagnostic.txt
  65. pip show python-dotenv gradio torch torchaudio torchvision >> ./installer_scripts/diagnostic.txt 2>&1
  66. echo "" >> ./installer_scripts/diagnostic.txt
  67. # Configuration files
  68. echo ".gpu:" >> ./installer_scripts/diagnostic.txt
  69. cat ./installer_scripts/.gpu >> ./installer_scripts/diagnostic.txt 2>&1
  70. echo "" >> ./installer_scripts/diagnostic.txt
  71. echo ".major_version:" >> ./installer_scripts/diagnostic.txt
  72. cat ./installer_scripts/.major_version >> ./installer_scripts/diagnostic.txt 2>&1
  73. echo "" >> ./installer_scripts/diagnostic.txt
  74. echo ".python_version:" >> ./installer_scripts/diagnostic.txt
  75. cat ./installer_scripts/.python_version >> ./installer_scripts/diagnostic.txt 2>&1
  76. echo "" >> ./installer_scripts/diagnostic.txt
  77. # npm list in react-ui
  78. echo "npm list --prefix ./react-ui/" >> ./installer_scripts/diagnostic.txt
  79. npm list --prefix ./react-ui/ >> ./installer_scripts/diagnostic.txt 2>&1
  80. echo "" >> ./installer_scripts/diagnostic.txt