-
Notifications
You must be signed in to change notification settings - Fork 2
/
run.sh
executable file
·34 lines (30 loc) · 931 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
cd `dirname $0`
OS=$(uname)
if [ -f .installed ]
then
source .venv/bin/activate
else
if ! command -v uv 2>&1 >/dev/null; then
pip install uv --break-system-packages
fi
uv venv --python 3.12
source .venv/bin/activate
uv pip install -U -r requirements.txt
if [ $? -eq 0 ]
then
touch .installed
fi
# viam-sdk and the required version of tensorflow are incompatible, so we hack this by installing
# viam-sdk afterwards
uv pip install viam-sdk==0.31.0
if [[ $OS == "Linux" ]]; then
echo "Running on Linux"
echo "Updating and installing dependencies"
sudo apt update && sudo apt upgrade -y
sudo apt-get update && sudo apt-get install ffmpeg libsm6 libxext6 -y
fi
fi
# Be sure to use `exec` so that termination signals reach the python process,
# or handle forwarding termination signals manually
exec python3 -m src $@