Skip to content

Commit

Permalink
Merge pull request #904 from Anthonyxd22/patch-4
Browse files Browse the repository at this point in the history
macOS install fix
  • Loading branch information
blaisewf authored Dec 8, 2024
2 parents 9176c02 + e7c1de3 commit e6c370c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions run-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ install_ffmpeg_flatpak() {
fi
}


install_python_ffmpeg() {
log_message "Installing python-ffmpeg..."
python -m pip install python-ffmpeg
Expand Down Expand Up @@ -158,7 +157,19 @@ 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 [email protected]

# 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.10 using Homebrew..."
brew install [email protected]
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
elif [ "$python_version" != "3.10" ]; then
log_message "Unsupported Python version detected: $python_version. Please use Python 3.10."
exit 1
fi

brew install faiss
export PYTORCH_ENABLE_MPS_FALLBACK=1
export PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0
export PATH="/opt/homebrew/bin:$PATH"
Expand All @@ -169,3 +180,5 @@ elif [ "$(uname)" != "Linux" ]; then
fi

prepare_install


0 comments on commit e6c370c

Please sign in to comment.