-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_virtual_env.sh
42 lines (30 loc) · 914 Bytes
/
create_virtual_env.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
#!/bin/bash
set -e
export PYTHONDONTWRITEBYTECODE=1
SCRIPTDIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
VENV=".venv"
function activate_virtual_env() {
# Create virtualenv
python3.9 -m venv $SCRIPTDIR/$VENV
# Python 3.11.7 with Window
if [ -d "$VENV/bin" ]; then
source $SCRIPTDIR/$VENV/bin/activate
else
source $SCRIPTDIR/$VENV/Scripts/activate
fi
echo "Created virtual enviroment >>" + $SCRIPTDIR/$VENV/bin/activate
#echo "Create Poetry Environment"
# Python 3.11.7 with Window
#pip install poetry
#poetry install
#echo "Finish Poetry Environment Completely.."
echo "Install requirements.txt"
pip install --upgrade pip
pip install -r $SCRIPTDIR/dev-requirement.txt
echo "Install Completely.."
}
if [ -d $SCRIPTDIR/$VENV ]; then
echo "VirtualEnv exists."
rm -rf $SCRIPTDIR/$VENV
fi
activate_virtual_env