#!/bin/bash

# install mmcv 2.2.0
pip uninstall -y mmcv-full
pip install https://taco-public-1251001002.cos.ap-shanghai.myqcloud.com/external/haiguang/whl/mmcv-2.2.0%2Bdas.opt1.dtk25044.20260107.gb9d4e636-cp310-cp310-manylinux_2_28_x86_64.whl

# install mmengine and mmdet
pip install mmengine==0.10.7 mmdet==3.3.0
sed 's/2.2.0/2.2.1/' -i /usr/local/lib/python3.10/dist-packages/mmdet/__init__.py

# workaround for model compile
mv /usr/local/lib/python3.10/dist-packages/mmengine/runner/runner.py /usr/local/lib/python3.10/dist-packages/mmengine/runner/runner.py.bak
wget https://taco-public-1251001002.cos.ap-shanghai.myqcloud.com/external/haiguang/whl/runner.py -P /usr/local/lib/python3.10/dist-packages/mmengine/runner/
