Files
ProjectBabble/run_babble_cpu.sh
SpookySkeletons 190f814685 Introduce bash start script.
Creates venv, resolves dependencies, then runs application.
2023-03-26 18:45:40 -04:00

26 lines
599 B
Bash

#!/bin/bash
# Set virtual environment directory name
VENV_DIR="venv"
# Check if the virtual environment directory exists, create it if not
if [ ! -d "$VENV_DIR" ]; then
echo "Creating virtual environment..."
python3 -m venv "$VENV_DIR"
fi
# Activate the virtual environment
source "$VENV_DIR/bin/activate"
# Install or update packages from the requirements.txt file
echo "Installing or updating packages from requirements.txt..."
pip install --upgrade -r requirements.txt
# Run BabbleCPU.py
echo "Starting BabbleCPU..."
python BabbleCPU.py
# Deactivate the virtual environment
deactivate