File size: 595 Bytes
0e1330a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env bash
set -euo pipefail

# get the folder this script is in and make sure we're in it
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
cd "${script_dir}"

# make venv if not exist
if [[ ! -d .venv ]]; then
    echo "Creating virtual environment..."
    python3.10 -m venv .venv
fi

# activate the venv
source .venv/bin/activate

# upgrade pip
python -m pip install -U pip setuptools wheel

# install requirements
python -m pip install -r requirements.txt

echo "Setup complete. Run 'source .venv/bin/activate' to enter the virtual environment."
exit 0