-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (44 loc) · 1.93 KB
/
Makefile
File metadata and controls
52 lines (44 loc) · 1.93 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
.PHONY: test setup miniwob lint stop-miniwob osworld
setup:
@uv sync --python 3.12
@uv run playwright install chromium --with-deps
@uv run python -c 'import nltk; nltk.download("punkt_tab")'
miniwob: stop-miniwob
@git clone https://github.com/Farama-Foundation/miniwob-plusplus.git || true
@cd miniwob-plusplus && git checkout 7fd85d71a4b60325c6585396ec4f48377d049838
@uv run python -m http.server 8080 --directory miniwob-plusplus/miniwob/html & echo $$! > .miniwob-server.pid
@sleep 3
@echo "MiniWob server started on http://localhost:8080"
check-miniwob:
@curl -I "http://localhost:8080/miniwob/" || (echo "MiniWob not reachable" && exit 1)
@echo "MiniWob server is reachable"
stop-miniwob:
@kill -9 `cat .miniwob-server.pid` || true
@rm -f .miniwob-server.pid
@echo "MiniWob server stopped"
run-tests:
@MINIWOB_URL="http://localhost:8080/miniwob/" uv run pytest -n 5 --durations=10 -m 'not pricy' tests/
@echo "Tests completed"
test: setup miniwob check-miniwob run-tests stop-miniwob
lint: setup
@uv run black src/ --check --diff
@uv run darglint -v 2 -z short src/
osworld:
@echo "Setting up OSWorld..."
@git clone https://github.com/xlang-ai/OSWorld || true
@echo "Modifying OSWorld requirements.txt to remove pinned versions..."
@cd OSWorld && \
sed -i.bak 's/numpy~=.*/numpy/' requirements.txt && \
sed -i.bak 's/torch~=.*/torch/' requirements.txt && \
sed -i.bak 's/torch$$/torch/' requirements.txt && \
sed -i.bak 's/tqdm~=.*/tqdm/' requirements.txt && \
sed -i.bak 's/pandas~=.*/pandas/' requirements.txt
@echo "Installing OSWorld requirements..."
@cd OSWorld && uv pip install -r requirements.txt
@echo "Installing OSWorld in development mode..."
@cd OSWorld && uv pip install -e .
@echo "OSWorld setup completed!"
@echo "Next steps:"
@echo "1. Configure your VM (VMware/VirtualBox) according to OSWorld documentation"
@echo "2. Download or set up the Ubuntu VM image"
@echo "3. Run AgentLab with OSWorld tasks"