diff --git a/print_env.sh b/print_env.sh index ddb36bc65..6f2d33b0e 100644 --- a/print_env.sh +++ b/print_env.sh @@ -5,9 +5,12 @@ # "./print_env.sh" - prints to stdout # "./print_env.sh > env.txt" - prints to file "env.txt" +print_env() { echo "**git***" if [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" == "true" ]; then git log --decorate -n 1 +echo "**git submodules***" +git submodule status --recursive else echo "Not inside a git repository" fi @@ -27,19 +30,19 @@ lscpu echo echo "***CMake***" -which cmake && cmake --version +which cmake && cmake --version echo echo "***g++***" -which g++ && g++ --version +which g++ && g++ --version echo echo "***nvcc***" -which nvcc && nvcc --version +which nvcc && nvcc --version echo echo "***Python***" -which python && python --version +which python && python -c "import sys; print('Python {0}.{1}.{2}'.format(sys.version_info[0], sys.version_info[1], sys.version_info[2]))" echo echo "***Environment Variables***" @@ -62,7 +65,7 @@ echo # Print conda packages if conda exists if type "conda" &> /dev/null; then echo '***conda packages***' -which conda && conda list +which conda && conda list echo # Print pip packages if pip exists elif type "pip" &> /dev/null; then @@ -74,3 +77,11 @@ else echo "conda not found" echo "pip not found" fi +} + +echo "
Click here to see environment details
"
+echo "     "
+print_env | while read -r line; do
+    echo "     $line"
+done
+echo "
"