Auto-install Python venv for edit sidecar; update site submodule
This commit is contained in:
+7
-1
@@ -17,7 +17,13 @@ fi
|
|||||||
# Start edit sidecar if requested
|
# Start edit sidecar if requested
|
||||||
if [[ "$*" == *"--edit"* ]]; then
|
if [[ "$*" == *"--edit"* ]]; then
|
||||||
echo "Starting edit sidecar on :8001..."
|
echo "Starting edit sidecar on :8001..."
|
||||||
(cd "$ROOT" && uvicorn edit.server:app --reload --port 8001) &
|
UVICORN="$ROOT/.venv/bin/uvicorn"
|
||||||
|
if [ ! -x "$UVICORN" ]; then
|
||||||
|
echo "Setting up Python venv..."
|
||||||
|
python3 -m venv "$ROOT/.venv"
|
||||||
|
"$ROOT/.venv/bin/pip" install -r "$ROOT/edit/requirements.txt" -q
|
||||||
|
fi
|
||||||
|
(cd "$ROOT" && "$UVICORN" edit.server:app --reload --port 8001) &
|
||||||
SIDECAR_PID=$!
|
SIDECAR_PID=$!
|
||||||
trap "kill $SIDECAR_PID 2>/dev/null" EXIT
|
trap "kill $SIDECAR_PID 2>/dev/null" EXIT
|
||||||
fi
|
fi
|
||||||
|
|||||||
+1
-1
Submodule site updated: 4ebc4c798c...5786fd827f
Reference in New Issue
Block a user