ROCmPort-AI / start.sh
tazwarrrr's picture
feat: clean HF Space with essential ROCmPort AI files and new short README
a02870b
#!/bin/bash
echo "ROCmPort AI - Starting Backend Server..."
echo
cd "$(dirname "$0")"
echo "Installing dependencies..."
if [ ! -d .venv ]; then
python3 -m venv .venv
fi
. .venv/bin/activate
pip install -r backend/requirements.txt
echo
echo "Setting up environment..."
if [ ! -f .env ]; then
echo "Creating .env file from template..."
cp .env.example .env
echo "Please edit .env file and add your GROQ_API_KEY"
echo
fi
echo
echo "Building frontend..."
npm --prefix frontend install
npm --prefix frontend run build
if [ $? -ne 0 ]; then
echo "Frontend build failed. Make sure Node.js and npm are installed."
exit 1
fi
echo
echo "Starting FastAPI server..."
echo "Server will be available at: http://localhost:8000"
echo "Frontend should be opened at: http://localhost:8000/index.html"
echo
echo "Press Ctrl+C to stop the server"
echo
python -m uvicorn backend.main:app --reload --port 8000 --host 0.0.0.0