@echo off

echo please make sure that default Python version is 3.10.x

git clone https://github.com/THUDM/CogVLM

cd CogVLM

python -m pip install --upgrade pip

echo composing venv
IF NOT EXIST venv (
    python -m venv venv
) ELSE (
    echo venv folder already exists, skipping making new venv...
)
call .\venv\Scripts\activate.bat

echo installing torch

pip3 install torch==2.2.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

echo installing bitsandbytes

pip install https://github.com/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.41.2.post2-py3-none-win_amd64.whl --upgrade

echo installing triton-2.1.0

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

echo installing requirements

pip install https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/deepspeed-0.11.2_cuda121-cp310-cp310-win_amd64.whl

pip install SwissArmyTransformer
pip install transformers==4.37.2
pip install xformers==0.0.24
pip install spacy
pip install pillow

pip install seaborn
pip install loguru==0.7.2
pip install streamlit
pip install timm
pip install accelerate
pip install pydantic

python -m spacy download en_core_web_sm

pip install gradio
pip install jsonlines
pip install apex

echo all install completed. please verify no errors
REM Exit the batch file
pause
