1
1
#! /bin/bash
2
2
3
- # Install system dependencies for Playwright
4
- echo " Installing system dependencies..."
5
- ./playwright/install
6
-
7
- # Create virtual environment
8
- echo " Creating virtual environment..."
9
- uv venv --python python3.12 ~ /.browser-use-venv
3
+ # # Install system dependencies for Playwright
4
+ # echo "NOTE: ensure ~/dotfiles/playwright/install was successfull before contiuuing here"
5
+ #
6
+ # Create virtual environment if it doesn't exist
7
+ if [ ! -d ~ /.browser-use-venv ]; then
8
+ echo " Creating virtual environment..."
9
+ uv venv --python python3.12 ~ /.browser-use-venv
10
+ fi
10
11
11
- # Install dependencies
12
- echo " Installing browser-use and dependencies..."
12
+ # # Install dependencies
13
+ # echo "Installing browser-use and dependencies..."
13
14
source ~ /.browser-use-venv/bin/activate
14
-
15
- # Install main packages
16
- uv pip install browser-use
17
- uv pip install gradio fastapi uvicorn
18
-
19
-
20
- # Install Playwright
21
- uv pip install playwright
22
-
23
- # Install browser dependencies
24
- echo " Installing Playwright browsers..."
25
- ./playwright/install
15
+ #
16
+ # # Install main packages
17
+ # uv pip install browser-use
18
+ # uv pip install gradio fastapi uvicorn
19
+ #
20
+ # # Install Playwright
21
+ # uv pip install playwright
26
22
27
23
# Install additional requirements
24
+ sudo mkdir -p /opt/browser-use-webui
25
+ sudo chown $USER :$USER /opt/browser-use-webui
26
+
27
+ git clone
[email protected] :warmshao/browser-use-webui.git /opt/browser-use-webui
28
+ cd /opt/browser-use-webui
28
29
if [ -f requirements.txt ]; then
29
30
echo " Installing additional requirements..."
30
31
uv pip install -r requirements.txt
@@ -34,13 +35,28 @@ deactivate
34
35
35
36
# Verify installation
36
37
echo " Verifying installation..."
37
- if ~ /.browser-use-venv/bin/python -c " import browser_use_webui; print('browser-use-webui version:', browser_use_webui.__version__)" ; then
38
- echo " Installation successful"
38
+ if ~ /.browser-use-venv/bin/python -c " import browser_use" ; then
39
+ echo " browser-use installed successfully"
40
+ if ~ /.browser-use-venv/bin/python -c " import gradio, fastapi, uvicorn" ; then
41
+ echo " Web UI dependencies installed successfully"
42
+ else
43
+ echo " Web UI dependencies installation failed"
44
+ exit 1
45
+ fi
39
46
else
40
- echo " Installation failed"
47
+ echo " browser-use installation failed"
41
48
exit 1
42
49
fi
43
50
51
+ # Create launcher script
52
+ echo " Creating launcher script..."
53
+ cat > ~ /.browser-use-venv/bin/browser-use-webui << 'EOF '
54
+ #!/bin/bash
55
+ source ~/.browser-use-venv/bin/activate
56
+ python /opt/browser-use-webui/webui.py "$@"
57
+ EOF
58
+ chmod +x ~ /.browser-use-venv/bin/browser-use-webui
59
+
44
60
# Create symlink for easy access
45
61
echo " Creating symlink..."
46
62
ln -sf ~ /.browser-use-venv/bin/browser-use-webui ~ /.local/bin/browser-use-webui
0 commit comments