From 20ab1d320a490f360d891580914bbfc99cd5ef48 Mon Sep 17 00:00:00 2001 From: Mercury Date: Sat, 25 Jan 2025 12:14:53 +0100 Subject: [PATCH] Add venv startup script, fix deps --- requirements.txt | 4 +++- start.sh | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 start.sh diff --git a/requirements.txt b/requirements.txt index 8a30767..424f42c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,6 @@ psycopg2-binary python-dotenv bcrypt uvicorn -openskill \ No newline at end of file +openskill +requests + diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..092a2ac --- /dev/null +++ b/start.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +ver="3.11" +py="python$ver" + +if ! command -v $py &> /dev/null +then + echo "$py not found" + exit +fi + +if [ -d .venv/ ] +then + source .venv/bin/activate +else + $py -m venv .venv + source .venv/bin/activate + $py -m pip install -U -r requirements.txt +fi + +exec uvicorn main:app --reload --host 0.0.0.0 --port 9134