From 190f814685090fd22296fae62360038315914078 Mon Sep 17 00:00:00 2001 From: SpookySkeletons <37986496+SpookySkeletons@users.noreply.github.com> Date: Sun, 26 Mar 2023 18:45:40 -0400 Subject: [PATCH] Introduce bash start script. Creates venv, resolves dependencies, then runs application. --- run_babble_cpu.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 run_babble_cpu.sh diff --git a/run_babble_cpu.sh b/run_babble_cpu.sh new file mode 100644 index 0000000..274b8dc --- /dev/null +++ b/run_babble_cpu.sh @@ -0,0 +1,25 @@ +#!/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 +