File size: 1,129 Bytes
fab8051
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
44
45
46
#!/bin/bash

set -e

# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'

echo -e "${GREEN}Setting up radextract development environment${NC}"

# Check if virtual environment exists
if [ ! -d "venv" ]; then
    echo -e "${YELLOW}Creating virtual environment...${NC}"
    python3 -m venv venv
fi

# Activate virtual environment
echo -e "${YELLOW}Activating virtual environment...${NC}"
source venv/bin/activate

# Install dependencies
echo -e "${YELLOW}Installing dependencies...${NC}"
if [ "$1" = "dev" ]; then
    echo -e "${YELLOW}Installing with development dependencies...${NC}"
    pip install -e ".[dev]"
else
    pip install -e .
fi

# Check if env.list exists
if [ ! -f "env.list" ]; then
    echo -e "${RED}Error: env.list file not found!${NC}"
    echo -e "${YELLOW}Please create env.list with required environment variables${NC}"
    exit 1
fi

# Load environment variables
echo -e "${YELLOW}Loading environment variables...${NC}"
export $(cat env.list | xargs)

# Start the application
echo -e "${GREEN}Starting radextract application on http://localhost:7870${NC}"
python app.py