Spaces:
Running
Running
File size: 632 Bytes
399b80c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT_ROOT="$( cd "$SCRIPT_DIR/../.." && pwd )"
# Check Python
if ! command -v python3 &> /dev/null; then
echo "Error: python3 not installed"
exit 1
fi
# Check if dependencies are installed
if ! python3 -c "import flask" &> /dev/null; then
echo "Installing dependencies..."
pip3 install -q -r "$SCRIPT_DIR/requirements.txt" || {
echo "Failed to install dependencies"
exit 1
}
fi
# Set PYTHONPATH and start server
export PYTHONPATH="$PROJECT_ROOT:$PYTHONPATH"
cd "$PROJECT_ROOT"
python3 -m openspace.local_server.main |