tabbyAPI-ollama/start.sh
kingbri ee84d892b8 Start: Add shell script
Same as the batch file. Also edit the python script to work when
a venv is clean.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-12-27 23:53:14 -05:00

19 lines
397 B
Bash
Executable file

#!/bin/bash
cd "$(dirname "$0")" || exit
if [ -n "$CONDA_PREFIX" ]; then
echo "It looks like you're in a conda environment. Skipping venv check."
else
if [ ! -d "venv" ]; then
echo "Venv doesn't exist! Creating one for you."
python3 -m venv venv
fi
echo "Activating venv"
# shellcheck source=/dev/null
source venv/bin/activate
fi
python3 start.py "$@"