jam-tracks / scripts /run_local.sh
Mina Emadi
updated the MVP-Initial upload
a0fcd39
#!/bin/bash
# Run Jam Track Studio locally
# Check if we're in the project root
if [ ! -f "backend/main.py" ]; then
echo "Error: Please run this script from the project root directory"
exit 1
fi
# Install backend dependencies if needed
if [ ! -d "backend/.venv" ]; then
echo "Installing backend dependencies..."
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cd ..
else
source backend/.venv/bin/activate
fi
# Install frontend dependencies if needed
if [ ! -d "frontend/node_modules" ]; then
echo "Installing frontend dependencies..."
cd frontend
npm install
cd ..
fi
# Build frontend
echo "Building frontend..."
cd frontend
npm run build
cd ..
# Run backend
echo "Starting server on http://localhost:7860"
python -m uvicorn backend.main:app --host 0.0.0.0 --port 7860