#!/bin/bash

UPGRADE_IMAGE_PATH=$1

cd $UPGRADE_IMAGE_PATH

tar zxf xtai-install.tar.gz
cd ./xtai-install
while read line
do
	if [[ "$line" =~ "hhb_onnxruntime_th1520" ]];then
		python3 -m pip install $line --no-index --no-deps --upgrade --target /usr/lib64/python3.11/site-packages/
	elif [[ "$line" =~ "matplotlib" ]];then
		python3 -m pip install $line --no-index --no-deps --upgrade --pre --target /usr/lib64/python3.11/site-packages/
	else
		python3 -m pip install $line --no-index --no-deps --target /usr/lib64/python3.11/site-packages/
	fi
done < wheels.list

