mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
Start: Add check for uv
Uv is the definitive package installation tool for Python, so add support to check for it via the start script. Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
This commit is contained in:
14
start.sh
14
start.sh
@@ -2,12 +2,24 @@
|
||||
|
||||
cd "$(dirname "$0")" || exit
|
||||
|
||||
if command -v uv >/dev/null 2>&1; then
|
||||
HAS_UV=1
|
||||
else
|
||||
HAS_UV=0
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
if [ "$HAS_UV" -eq 1 ]; then
|
||||
echo "It looks like you're using uv. Running appropriate commands."
|
||||
uv venv venv -p 3.12
|
||||
else
|
||||
python3 -m venv venv
|
||||
fi
|
||||
|
||||
if [ -f "start_options.json" ]; then
|
||||
echo "Removing old start_options.json"
|
||||
|
||||
Reference in New Issue
Block a user