pip install requests
pip install tqdm
sudo apt-get update
sudo apt-get install git-lfs --yes

git lfs install
sudo apt update
sudo apt install ffmpeg --yes
sudo apt install vlc --yes
sudo update-alternatives --set x-www-browser /usr/bin/vlc --yes
xdg-mime default vlc.desktop video/mp4
xdg-mime default vlc.desktop x-scheme-handler/rtsp

sudo apt-get update
sudo apt-get install libxcb-cursor0

sudo apt-get update
sudo apt-get install -y cmake build-essential python3-dev

export HF_XET_HIGH_PERFORMANCE=1

git clone https://github.com/FurkanGozukara/Paints-UNDO

cd Paints-UNDO

python3.11 -m venv venv

source ./venv/bin/activate

echo "Installing requirements"

cd ..

python3 -m pip install --upgrade pip

pip install uv

uv pip install wheel

uv pip install -r requirements_paints_undo.txt  --index-strategy unsafe-best-match
uv pip install -r requirements_onnx_cuda13_deps.txt
uv pip install --prerelease=allow --no-deps -r requirements_onnx_cuda13.txt
uv pip install xformers==0.0.35 --no-deps --index-url https://download.pytorch.org/whl/cu130

# Show completion message
echo "Virtual environment made and installed properly"

# Keep the terminal open
read -p "Press Enter to continue..."
