-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
52 lines (41 loc) · 1.25 KB
/
Copy pathdeploy.sh
File metadata and controls
52 lines (41 loc) · 1.25 KB
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
47
48
49
50
51
52
#!/bin/bash
set -e # Exit immediately if a command exits with a non-zero status
# Step 1: Create and activate a virtual environment
VENV_DIR="venv"
echo "Creating virtual environment..."
python3 -m venv $VENV_DIR
# Activate virtual environment
echo "Activating virtual environment..."
source $VENV_DIR/bin/activate
# Step 2: Install backend dependencies
echo "Installing backend dependencies from requirements.txt..."
pip install -r requirements.txt
playwright install --with-deps
# Step 3: Clone and install additional backend dependencies
rm -rf autogen
REPO_URL="https://github.com/microsoft/autogen.git"
echo "Cloning repository from $REPO_URL..."
git clone $REPO_URL
cd autogen/python/packages/autogen-magentic-one
pip install -e .
cd ../autogen-core
pip install -e .
cd ../autogen-ext
pip install -e .
cd ../../../..
# Step 4: Build the React frontend
echo "Building React frontend..."
cd autobnb-app
npm install
npm run build
# Step 5: Copy React build files to Flask's static directory
echo "Copying React build files to Flask's static directory..."
rm -rf ../static/build
mkdir -p ../static/build
cp -r build/* ../static/build
cd ..
echo "Build complete!"
# Run the Flask application
echo "Running Flask application..."
python main.py
echo "Deployment complete!"