-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·42 lines (34 loc) · 1.11 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·42 lines (34 loc) · 1.11 KB
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
#!/bin/bash
# Script to create a Python virtual environment and install requirements
VENV_DIR=".venv"
# Check if python3 is available
if ! command -v python3 &> /dev/null; then
echo "Error: python3 is not installed or not in PATH."
echo "Please install Python 3.10 or higher and try again."
exit 1
fi
# Check if virtual environment already exists
if [ -d "$VENV_DIR" ]; then
echo "Virtual environment already exists at $VENV_DIR"
else
echo "Creating virtual environment at $VENV_DIR..."
python3 -m venv "$VENV_DIR"
echo "Virtual environment created."
fi
# Activate the virtual environment
echo "Activating virtual environment..."
source "$VENV_DIR/bin/activate"
# Upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip
# Install requirements
echo "Installing requirements..."
pip install -r requirements.txt
echo ""
echo "Setup complete!"
echo "To activate the virtual environment, run:"
echo " source $VENV_DIR/bin/activate"
echo ""
echo "Don't forget to create a .env file with your Azure OpenAI credentials."
echo "You can copy .env.example as a template:"
echo " cp .env.example .env"