chore(run.sh): add detailed logging for venv setup
This commit is contained in:
parent
194a4d4377
commit
7d42abea78
@ -23,15 +23,23 @@ echo "Python venv module found."
|
||||
# --- Backend Setup ---
|
||||
echo "Setting up backend..."
|
||||
cd backend
|
||||
echo "--> Changed directory to $(pwd)"
|
||||
|
||||
# Create a virtual environment if it doesn't exist
|
||||
if [ ! -d ".venv" ]; then
|
||||
echo "Creating virtual environment..."
|
||||
# Create a virtual environment if it doesn't exist or is invalid
|
||||
echo "--> Checking for .venv/bin/activate..."
|
||||
if [ ! -f ".venv/bin/activate" ]; then
|
||||
echo "--> .venv/bin/activate NOT found. Recreating virtual environment..."
|
||||
rm -rf .venv
|
||||
python3 -m venv .venv
|
||||
echo "--> Virtual environment created."
|
||||
else
|
||||
echo "--> .venv/bin/activate found. Skipping creation."
|
||||
fi
|
||||
|
||||
# Activate virtual environment and install dependencies
|
||||
echo "--> Activating virtual environment..."
|
||||
source .venv/bin/activate
|
||||
echo "--> Virtual environment activated."
|
||||
pip install -r requirements.txt
|
||||
deactivate
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user