f60e7b5ad1
Build Server .exe / build (push) Failing after 2m30s
- start.bat and start.sh now create conda env (paperdash, Python 3.11) - README updated with conda setup instructions - Fixes pyhwinfo installation issues on Python 3.12+
35 lines
857 B
Bash
35 lines
857 B
Bash
#!/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
|