-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
106 lines (95 loc) · 3 KB
/
Dockerfile
File metadata and controls
106 lines (95 loc) · 3 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Dockerfile for Mobile-Agent-v3 Virtual Runner
# Uses Mobile-Agent-V3 multi-agent architecture (Planning, Decision, Reflection)
# No Android SDK/Emulator required - runs in pure virtual environment with Gemini-3
FROM python:3.11-slim
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
WORKDIR /app
#=============================
# Install System Dependencies
#=============================
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
build-essential \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
#=============================
# Copy Application Files
#=============================
COPY requirements.txt .
COPY run_virtual.py .
COPY run_virtual.sh .
COPY virtual_env_adapter.py .
COPY virtual_env_gemini3.py .
COPY agent_env/ ./agent_env/
COPY config/ ./config/
COPY examples/ ./examples/
COPY start_Android.png .
#=============================
# Install Python Dependencies
#=============================
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
#=============================
# Create Output Directories
#=============================
RUN mkdir -p /app/outputs /app/logs /app/trajectories
#=============================
# Set Permissions
#=============================
RUN chmod +x run_virtual.sh
#=============================
# Environment Variables
#=============================
ENV PYTHONPATH=/app:$PYTHONPATH
ENV OUTPUT_PATH=/app/outputs
ENV LOG_PATH=/app/logs
ENV TRAJ_PATH=/app/trajectories
#=============================
# Default Command
#=============================
CMD ["python", "run_virtual.py", "--help"]
# =============================
# Usage Examples
# =============================
#
# Build:
# docker build -t mobile-agent-virtual .
#
# Run basic task:
# docker run -it \
# -e GEMINI_API_KEY="your-gemini-key" \
# -e GEMINI_BASE_URL="https://api.dou.chat/v1" \
# -e GEMINI_MODEL="google/gemini-3-pro-image-preview" \
# -e AGENT_MODEL="path-to-GUI-Owl-7B" \
# -e AGENT_BASE_URL="http://host.docker.internal:4243/v1" \
# -e AGENT_API_KEY="EMPTY" \
# -v $(pwd)/outputs:/app/outputs \
# -v $(pwd)/logs:/app/logs \
# -v $(pwd)/trajectories:/app/trajectories \
# mobile-agent-virtual \
# python run_virtual.py --agent_name=mobile_agent_v3 --use_virtual_env=True
#
# Run specific task:
# docker run -it \
# -e GEMINI_API_KEY="your-key" \
# -e AGENT_MODEL="path-to-model" \
# -v $(pwd)/outputs:/app/outputs \
# mobile-agent-virtual \
# python run_virtual.py --agent_name=mobile_agent_v3 --tasks=ContactsAddContact --use_virtual_env=True
#
# Run with bash script (Linux/Mac):
# docker run -it \
# -e GEMINI_API_KEY="your-key" \
# -e AGENT_MODEL="path-to-model" \
# -v $(pwd)/outputs:/app/outputs \
# mobile-agent-virtual \
# bash run_virtual.sh --tasks social --category message
#
# Note: Use host.docker.internal instead of localhost to access services on host machine