File size: 938 Bytes
1a6672d
 
 
 
 
243b15a
1a6672d
 
243b15a
 
 
 
 
1a6672d
 
 
 
 
 
 
 
 
 
243b15a
 
 
 
 
 
 
 
 
1a6672d
 
 
 
 
 
 
 
243b15a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/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