From cc322b3d975a54299f8239d2ab04f89baba2872f Mon Sep 17 00:00:00 2001 From: "Menezes, Luke J (PG/T - Comp Sci & Elec Eng)" <lm01906@surrey.ac.uk> Date: Thu, 23 May 2024 17:41:56 +0000 Subject: [PATCH] Upload New File --- pipeline.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pipeline.sh diff --git a/pipeline.sh b/pipeline.sh new file mode 100644 index 0000000..92da549 --- /dev/null +++ b/pipeline.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Install required Python packages +pip3 install -r requirements.txt + +# Build stage +echo "build stage" + +# Convert Jupyter notebook to Python script +jupyter nbconvert --to script app.ipynb + +# Check if conversion was successful +if [ ! -f app.py ]; then + echo "Conversion failed, exiting pipeline" + exit 1 +fi + +echo "build completed" + +# Start Flask application in the background +echo "Starting Flask" +nohup python3 app.py & + +# Give the app some time to start +sleep 5 + +echo "App should have started in the background" \ No newline at end of file -- GitLab