Add venv startup script, fix deps
This commit is contained in:
parent
2b01c0078e
commit
20ab1d320a
|
@ -4,3 +4,5 @@ python-dotenv
|
|||
bcrypt
|
||||
uvicorn
|
||||
openskill
|
||||
requests
|
||||
|
||||
|
|
21
start.sh
Normal file
21
start.sh
Normal file
|
@ -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
|
Loading…
Reference in a new issue