Skip to content

Commit 34932a9

Browse files
committed
Fix submodules
1 parent 88a63f7 commit 34932a9

File tree

5 files changed

+1241
-0
lines changed

5 files changed

+1241
-0
lines changed
Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
# WebArena Quick Start
2+
3+
Two simple scripts to set up and manage WebArena locally:
4+
5+
## 1. Initial Setup (One-Time)
6+
7+
Run this once to download images and set everything up:
8+
9+
```bash
10+
cd evals/webarena-local
11+
./setup-webarena.sh
12+
```
13+
14+
**What it does:**
15+
- Downloads all Docker images (~75GB)
16+
- Loads images into Docker
17+
- Starts all services
18+
- Configures services for localhost
19+
- Tests all services
20+
- Updates task configs
21+
22+
**Time:** 1-2 hours (mostly downloading)
23+
24+
**Requirements:**
25+
- 80GB+ free disk space
26+
- Docker installed and running
27+
- `wget` or `curl` installed
28+
29+
## 2. Daily Management
30+
31+
Use this script to manage services after initial setup:
32+
33+
```bash
34+
./webarena.sh [command]
35+
```
36+
37+
### Commands
38+
39+
**Start services:**
40+
```bash
41+
./webarena.sh start
42+
```
43+
44+
**Check status:**
45+
```bash
46+
./webarena.sh status
47+
```
48+
49+
**Stop services:**
50+
```bash
51+
./webarena.sh stop
52+
```
53+
54+
**Restart services:**
55+
```bash
56+
./webarena.sh restart
57+
```
58+
59+
**View logs:**
60+
```bash
61+
./webarena.sh logs # All services
62+
./webarena.sh logs gitlab # Specific service
63+
```
64+
65+
**Open in browser:**
66+
```bash
67+
./webarena.sh open
68+
```
69+
70+
**Run a test:**
71+
```bash
72+
./webarena.sh test 3 # Run task 3
73+
./webarena.sh test 1 # Run task 1
74+
```
75+
76+
## Services & Ports
77+
78+
Once running, services are available at:
79+
80+
| Service | URL | Port |
81+
|---------|-----|------|
82+
| Shopping | http://localhost:7770 | 7770 |
83+
| Shopping Admin | http://localhost:7780 | 7780 |
84+
| Forum (Reddit) | http://localhost:9999 | 9999 |
85+
| GitLab | http://localhost:8023 | 8023 |
86+
| Wikipedia | http://localhost:8888 | 8888 |
87+
| Homepage | http://localhost:4399 | 4399 |
88+
89+
## Running WebArena Tasks
90+
91+
After services are started:
92+
93+
```bash
94+
cd evals
95+
96+
# Run specific task
97+
python3 run_webarena.py --task-id 1 --verbose
98+
99+
# Run all tasks (limited)
100+
python3 run_webarena.py --all --limit 10
101+
102+
# Run with custom timeout
103+
python3 run_webarena.py --task-id 1 --verbose
104+
```
105+
106+
## Troubleshooting
107+
108+
### Services won't start
109+
```bash
110+
# Check Docker is running
111+
docker ps
112+
113+
# Check logs
114+
./webarena.sh logs
115+
116+
# Try restarting
117+
./webarena.sh restart
118+
```
119+
120+
### GitLab shows 502 errors
121+
```bash
122+
# Fix GitLab
123+
docker exec webarena-gitlab rm -f /var/opt/gitlab/postgresql/data/postmaster.pid
124+
docker exec webarena-gitlab gitlab-ctl restart
125+
./webarena.sh status
126+
```
127+
128+
### Out of disk space
129+
```bash
130+
# Clean up Docker
131+
docker system prune -a
132+
133+
# Remove downloaded images after loading
134+
rm -rf ./webarena-images/
135+
```
136+
137+
### Port already in use
138+
```bash
139+
# Stop conflicting services
140+
lsof -i :7770 # Find what's using the port
141+
kill <PID> # Stop it
142+
143+
# Or use different ports in docker-compose.yml
144+
```
145+
146+
## Skip Full Setup (Manual)
147+
148+
If you already have the Docker images:
149+
150+
```bash
151+
# Load images manually
152+
docker load --input shopping_final_0712.tar
153+
docker load --input shopping_admin_final_0719.tar
154+
docker load --input postmill-populated-exposed-withimg.tar
155+
docker load --input gitlab-populated-final-port8023.tar
156+
docker load --input kiwix33.tar
157+
158+
# Start services
159+
./webarena.sh start
160+
161+
# Configure (run once)
162+
# Follow configuration steps in setup-webarena.sh
163+
```
164+
165+
## Alternative: Use Docker Compose Directly
166+
167+
```bash
168+
# Start
169+
docker-compose up -d
170+
171+
# Stop
172+
docker-compose down
173+
174+
# View logs
175+
docker-compose logs -f
176+
177+
# Restart specific service
178+
docker-compose restart gitlab
179+
```
180+
181+
## Uninstall
182+
183+
```bash
184+
# Stop and remove containers
185+
docker-compose down
186+
187+
# Remove images
188+
docker rmi shopping_final_0712
189+
docker rmi shopping_admin_final_0719
190+
docker rmi postmill-populated-exposed-withimg
191+
docker rmi gitlab-populated-final-port8023
192+
docker rmi kiwix33
193+
194+
# Remove downloaded files
195+
rm -rf ./webarena-images/
196+
197+
# Remove backup configs
198+
rm -rf ../webarena/config_files/examples.backup
199+
```
200+
201+
## Tips
202+
203+
- **First time:** Run `./setup-webarena.sh` once
204+
- **Daily use:** Use `./webarena.sh` commands
205+
- **Debugging:** Check `./webarena.sh logs`
206+
- **Disk space:** Clean up with `docker system prune`
207+
- **Performance:** GitLab uses most resources (~2GB RAM)
208+
209+
## Support
210+
211+
- **Setup issues:** Check `setup-webarena.sh` output
212+
- **Service issues:** Run `./webarena.sh logs [service]`
213+
- **Task issues:** Run with `--verbose` flag
214+
- **Full docs:** See `README.md`

0 commit comments

Comments
 (0)