File size: 1,212 Bytes
1d4dc07
 
 
 
 
4b28fb0
 
 
 
 
 
1d4dc07
 
4b28fb0
 
 
 
 
 
 
 
 
 
 
 
 
 
1d4dc07
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
43
#!/bin/bash

# Atlas Startup Script
echo "Starting Atlas..."

# Check if virtual environment exists, create if not
if [ ! -d "atlas_env" ]; then
    echo "Virtual environment not found. Creating atlas_env..."
    python3 -m venv atlas_env
    echo "Virtual environment created successfully."
    
    echo "Activating virtual environment..."
    source atlas_env/bin/activate
    
    echo "Installing packages from requirements.txt..."
    if [ -f requirements.txt ]; then
        pip install -r requirements.txt
        echo "Packages installed successfully."
    else
        echo "Warning: requirements.txt not found!"
    fi
else
    # Check if virtual environment is activated
    if [[ "$VIRTUAL_ENV" == "" ]]; then
        echo "Activating virtual environment..."
        source atlas_env/bin/activate
    fi
fi

# Check if .env file exists
if [ ! -f .env ]; then
    echo "Warning: .env file not found!"
    echo "Please create a .env file with your API keys:"
    echo "GOOGLE_API_KEY=your_google_api_key_here"
    echo "BRAVE_API_KEY=your_brave_api_key_here (optional)"
fi

# Run the application
echo "Starting Atlas server on http://localhost:7860"
echo "Press Ctrl+C to stop"
echo ""

python app.py