|
#!/bin/sh |
|
|
|
echo "Install environment..." |
|
|
|
. /etc/os-release |
|
ubuntu_version="$VERSION_ID" |
|
echo "Ubuntu version: $ubuntu_version" |
|
|
|
|
|
if [ "$ubuntu_version" \< "20.04" ]; then |
|
|
|
echo "Error: Ubuntu version must be 20.04 or later" |
|
exit 1 |
|
fi |
|
|
|
|
|
sudo apt-get update -y && sudo apt-get install -y python3 python3-pip python3-opencv libcurl4-openssl-dev libssl-dev libtbb-dev |
|
|
|
|
|
python3 -m pip install --upgrade pip && python3 -m pip install opencv-python flask flask-cors gradio |
|
|
|
|
|
if [ "$ubuntu_version" = "20.04" ]; then |
|
|
|
sudo cp -f dependency/libimutils.so /usr/lib |
|
elif [ "$ubuntu_version" = "22.04" ]; then |
|
|
|
sudo cp -f dependency/libimutils.so_for_ubuntu22 /usr/lib/libimutils.so |
|
else |
|
|
|
echo "Error: Unsupported Ubuntu version" |
|
exit 1 |
|
fi |
|
|
|
|
|
sudo cp -rf dependency/openvino /usr/lib |
|
|
|
echo "Installed successfully!" |