From 61eaca70ef1fcedd1728101675736d5db5144b79 Mon Sep 17 00:00:00 2001 From: Anthony <144498068+Anthonyxd22@users.noreply.github.com> Date: Wed, 4 Dec 2024 23:39:40 -0500 Subject: [PATCH 1/4] Update run-install.sh --- run-install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/run-install.sh b/run-install.sh index 32a72924..ecd8f780 100644 --- a/run-install.sh +++ b/run-install.sh @@ -13,7 +13,7 @@ log_message() { # Function to find a suitable Python version find_python() { - for py in python3.10 python3 python; do + for py in python3.10 python3.9 python3 python; do if command -v "$py" > /dev/null 2>&1; then echo "$py" return @@ -66,7 +66,6 @@ install_ffmpeg_flatpak() { fi } - install_python_ffmpeg() { log_message "Installing python-ffmpeg..." python -m pip install python-ffmpeg @@ -158,7 +157,8 @@ if [ "$(uname)" = "Darwin" ]; then log_message "Homebrew not found. Installing Homebrew..." /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi - brew install python@3.10 + brew install python@3.10 python@3.9 + brew install faiss export PYTORCH_ENABLE_MPS_FALLBACK=1 export PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 export PATH="/opt/homebrew/bin:$PATH" @@ -169,3 +169,4 @@ elif [ "$(uname)" != "Linux" ]; then fi prepare_install + From 94d53a226cfebd8f65b6decf23f43d0e1c7349d1 Mon Sep 17 00:00:00 2001 From: Anthony <144498068+Anthonyxd22@users.noreply.github.com> Date: Thu, 5 Dec 2024 06:33:49 -0500 Subject: [PATCH 2/4] . --- run-install.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/run-install.sh b/run-install.sh index ecd8f780..81f83e93 100644 --- a/run-install.sh +++ b/run-install.sh @@ -157,7 +157,20 @@ if [ "$(uname)" = "Darwin" ]; then log_message "Homebrew not found. Installing Homebrew..." /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi - brew install python@3.10 python@3.9 + + # Check installed Python version and install the correct Homebrew Python version ( macOS ) + python_version=$(python3 --version | awk '{print $2}' | cut -d'.' -f1,2) + if [ "$python_version" = "3.9" ]; then + log_message "Python 3.9 detected. Installing Python 3.9 using Homebrew..." + brew install python@3.9 + elif [ "$python_version" = "3.10" ]; then + log_message "Python 3.10 detected. Installing Python 3.10 using Homebrew..." + brew install python@3.10 + else + log_message "Python version $python_version detected. Please use Python 3.9 or 3.10." + exit 1 + fi + brew install faiss export PYTORCH_ENABLE_MPS_FALLBACK=1 export PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 From 9916e31349dc5e630be0e4a627e1785ba470eee2 Mon Sep 17 00:00:00 2001 From: Anthony <144498068+Anthonyxd22@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:43:46 -0500 Subject: [PATCH 3/4] Update run-install.sh --- run-install.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/run-install.sh b/run-install.sh index 81f83e93..fe46394b 100644 --- a/run-install.sh +++ b/run-install.sh @@ -158,16 +158,14 @@ if [ "$(uname)" = "Darwin" ]; then /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi - # Check installed Python version and install the correct Homebrew Python version ( macOS ) + # Check installed Python version and install the correct Homebrew Python version (macOS) python_version=$(python3 --version | awk '{print $2}' | cut -d'.' -f1,2) if [ "$python_version" = "3.9" ]; then - log_message "Python 3.9 detected. Installing Python 3.9 using Homebrew..." - brew install python@3.9 - elif [ "$python_version" = "3.10" ]; then - log_message "Python 3.10 detected. Installing Python 3.10 using Homebrew..." + log_message "Python 3.9 detected. Installing Python 3.10 using Homebrew..." brew install python@3.10 - else - log_message "Python version $python_version detected. Please use Python 3.9 or 3.10." + export PATH="/opt/homebrew/opt/python@3.10/bin:$PATH" + elif [ "$python_version" != "3.10" ]; then + log_message "Unsupported Python version detected: $python_version. Please use Python 3.10." exit 1 fi @@ -183,3 +181,4 @@ fi prepare_install + From e7c1de335fd3e437ba9cef6703cfecea35550c39 Mon Sep 17 00:00:00 2001 From: Anthony <144498068+Anthonyxd22@users.noreply.github.com> Date: Fri, 6 Dec 2024 07:01:46 -0500 Subject: [PATCH 4/4] Update run-install.sh --- run-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run-install.sh b/run-install.sh index fe46394b..350ce73b 100644 --- a/run-install.sh +++ b/run-install.sh @@ -13,13 +13,13 @@ log_message() { # Function to find a suitable Python version find_python() { - for py in python3.10 python3.9 python3 python; do + for py in python3.10 python3 python; do if command -v "$py" > /dev/null 2>&1; then echo "$py" return fi done - log_message "No compatible Python installation found. Please install Python 3.7+." + log_message "No compatible Python installation found. Please install Python 3.10." exit 1 }