-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathdev-install.sh
executable file
·47 lines (37 loc) · 1.26 KB
/
dev-install.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
35
36
37
38
39
40
41
42
43
44
45
46
47
# AUTO DEV SETUP
# check if rye is installed
if ! command -v rye &> /dev/null
then
echo "rye could not be found"
echo "Would you like to install via rye or pip? Enter 'rye' or 'pip':"
read install_method
clear
if [ "$install_method" = "rye" ]
then
echo "Installing via rye now ..."
curl -sSf https://rye-up.com/get | bash
echo "Check the rye docs for more info: https://rye-up.com/"
source "$HOME/.rye/env"
echo "SYNC: setup .venv"
rye sync
clear
echo "Run `source \"$HOME/.rye/env\"` and then `rye shell` to activate the virtual environment"
elif [ "$install_method" = "pip" ]
then
echo "Installing via pip now ..."
if command -v python &> /dev/null
then
python -m venv .venv
else
python3 -m venv .venv
fi
.venv/bin/python -m pip install -e .
.venv/bin/python -m pip install -r requirements-dev.lock
clear
echo "Run 'source .venv/bin/activate' to activate the virtual environment"
else
echo "Invalid option. Please run the script again and enter 'rye' or 'pip'."
exit 1
fi
fi
echo "Try 'python examples/simple_chatbot.py' to test your setup."