| #!/bin/bash |
|
|
| |
| if [ ! -f "run.py" ]; then |
| echo "run.py not found!" |
| exit 1 |
| fi |
|
|
| |
| VENV_DIR=".venv" |
|
|
| |
| if ! brew list --versions python@3.11 >/dev/null; then |
| echo "Python 3.11 is not installed. Please install it first." |
| exit 1 |
| fi |
|
|
| |
| echo "Creating a virtual environment using Python 3.11..." |
| python3.11 -m venv $VENV_DIR |
|
|
| |
| echo "Activating the virtual environment..." |
| source "$VENV_DIR/bin/activate" |
|
|
| |
| if [ "$VIRTUAL_ENV" != "" ]; then |
| echo "Virtual environment activated successfully." |
| else |
| echo "Failed to activate the virtual environment." |
| exit 1 |
| fi |
|
|
| |
| if [ -f "requirements.txt" ]; then |
| echo "Installing dependencies from requirements.txt..." |
| pip install -r requirements.txt |
| else |
| echo "requirements.txt not found. Skipping dependency installation." |
| fi |
|
|
| |
| echo "Running the run.py script..." |
| python run.py |
|
|
| |
| echo "Deactivating the virtual environment..." |
| deactivate |