#!/bin/bash # PaperDash Server Startup Script # Creates conda env if needed, installs dependencies, and starts the server set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "$SCRIPT_DIR" # Check if conda env exists if ! conda env list | grep -q "paperdash"; then echo "Creating conda environment..." conda create -y -n paperdash python=3.11 fi # Activate conda env conda activate paperdash # Install dependencies echo "Installing dependencies..." pip install --upgrade pip pip install -r requirements.txt # Run the server echo "Starting PaperDash server..." echo " Dashboard: http://localhost:8921" echo " API docs: http://localhost:8921/docs" echo "" echo "Set environment variables before starting:" echo " DASHBOARD_PIN=1234" echo " API_TOKEN=your-token" echo "" uvicorn main:app --host 0.0.0.0 --port 8921 --reload