@echo off

echo WARNING. For this auto installer to work you need to have installed Python 3.10.11, C++, Git, FFmpeg and CUDA
echo This tutorial shows all requirements step by step : https://youtu.be/DrhUHnYfwC0
echo This requirements will help you run all AI apps

py --version >nul 2>&1
if "%ERRORLEVEL%" == "0" (
    echo Python launcher is available. Generating Python 3.10 VENV
    py -3.10 -m venv venv
) else (
    echo Python launcher is not available, generating VENV with default Python. Make sure that it is 3.10
    python -m venv venv
)

call .\venv\Scripts\activate.bat

pip install https://github.com/woct0rdho/triton-windows/releases/download/v3.1.0-windows.post5/triton-3.1.0-cp310-cp310-win_amd64.whl
pip install -r requirements.txt

pip install https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/groundingdino-0.1.0-cp310-cp310-win_amd64.whl

REM git clone https://github.com/IDEA-Research/GroundingDINO
REM cd GroundingDINO
REM pip install -e .

python HF_model_downloader.py

REM Show completion message
echo Virtual environment made and installed properly

REM Pause to keep the command prompt open
pause