added init script

- Added init script which manages installation of python version, create venvs and install the required dependencies.
This commit is contained in:
Kaushal 2024-11-05 14:20:06 +05:30
parent f9fe11a8a9
commit e5efe897c8

20
init.sh Executable file
View File

@ -0,0 +1,20 @@
# checking the OS type and intalling python verison accordingly
# for macOS and linux
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "Running on macOS"
brew install python@3.11
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
echo "Running on Linux"
sudo apt update
sudo apt install python3.11
# in case of other OS types
else
echo "Install python 3.10 manually"
fi
python3.10 -m venv ./venvs/python_3_10
source ./venvs/python_3_10/bin/activate
pip install -r requirements.txt