mirror of
https://github.com/trycua/computer.git
synced 2025-12-30 18:09:55 -06:00
Completed python refactor migration
This commit is contained in:
@@ -154,7 +154,7 @@ weights/icon_detect/model.pt
|
||||
weights/icon_detect/model.pt.zip
|
||||
weights/icon_detect/model.pt.zip.part*
|
||||
|
||||
libs/omniparser/weights/icon_detect/model.pt
|
||||
libs/python/omniparser/weights/icon_detect/model.pt
|
||||
|
||||
# Example test data and output
|
||||
examples/test_data/
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
},
|
||||
"containerEnv": {
|
||||
"DISPLAY": "",
|
||||
"PYTHONPATH": "/app/libs/core:/app/libs/computer:/app/libs/agent:/app/libs/som:/app/libs/pylume:/app/libs/computer-server:/app/libs/mcp-server",
|
||||
"PYLUME_HOST": "host.docker.internal"
|
||||
},
|
||||
"forwardPorts": [7860],
|
||||
@@ -15,35 +14,5 @@
|
||||
"onAutoForward": "silent"
|
||||
}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-python.python",
|
||||
"ms-python.black-formatter",
|
||||
"charliermarsh.ruff",
|
||||
"ms-python.vscode-pylance"
|
||||
],
|
||||
"settings": {
|
||||
"python.defaultInterpreterPath": "/usr/local/bin/python",
|
||||
"python.terminal.activateEnvironment": false,
|
||||
"[python]": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "ms-python.black-formatter",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": "explicit"
|
||||
}
|
||||
},
|
||||
"python.linting.enabled": true,
|
||||
"python.linting.ruffEnabled": true,
|
||||
"python.formatting.provider": "black",
|
||||
"files.watcherExclude": {
|
||||
"**/.venv/**": true,
|
||||
"**/node_modules/**": true,
|
||||
"**/__pycache__/**": true,
|
||||
"**/.pytest_cache/**": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"postCreateCommand": "/bin/bash .devcontainer/post-install.sh"
|
||||
}
|
||||
|
||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -6,6 +6,10 @@ __pycache__/
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
node_modules/*
|
||||
*/node_modules
|
||||
**/node_modules
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
@@ -155,7 +159,7 @@ weights/icon_detect/model.pt
|
||||
weights/icon_detect/model.pt.zip
|
||||
weights/icon_detect/model.pt.zip.part*
|
||||
|
||||
libs/omniparser/weights/icon_detect/model.pt
|
||||
libs/python/omniparser/weights/icon_detect/model.pt
|
||||
|
||||
# Example test data and output
|
||||
examples/test_data/
|
||||
|
||||
22
.vscode/launch.json
vendored
22
.vscode/launch.json
vendored
@@ -10,7 +10,7 @@
|
||||
"python": "${workspaceFolder:cua-root}/.venv/bin/python",
|
||||
"cwd": "${workspaceFolder:cua-root}",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume"
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/python/core:${workspaceFolder:cua-root}/libs/python/computer:${workspaceFolder:cua-root}/libs/python/agent:${workspaceFolder:cua-root}/libs/python/som:${workspaceFolder:cua-root}/libs/python/pylume"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -23,7 +23,7 @@
|
||||
"python": "${workspaceFolder:cua-root}/.venv/bin/python",
|
||||
"cwd": "${workspaceFolder:cua-root}",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume"
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/python/core:${workspaceFolder:cua-root}/libs/python/computer:${workspaceFolder:cua-root}/libs/python/agent:${workspaceFolder:cua-root}/libs/python/som:${workspaceFolder:cua-root}/libs/python/pylume"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -36,7 +36,7 @@
|
||||
"python": "${workspaceFolder:cua-root}/.venv/bin/python",
|
||||
"cwd": "${workspaceFolder:cua-root}",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume"
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/python/core:${workspaceFolder:cua-root}/libs/python/computer:${workspaceFolder:cua-root}/libs/python/agent:${workspaceFolder:cua-root}/libs/python/som:${workspaceFolder:cua-root}/libs/python/pylume"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -49,7 +49,7 @@
|
||||
"python": "${workspaceFolder:cua-root}/.venv/bin/python",
|
||||
"cwd": "${workspaceFolder:cua-root}",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume"
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/python/core:${workspaceFolder:cua-root}/libs/python/computer:${workspaceFolder:cua-root}/libs/python/agent:${workspaceFolder:cua-root}/libs/python/som:${workspaceFolder:cua-root}/libs/python/pylume"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -62,7 +62,7 @@
|
||||
"python": "${workspaceFolder:cua-root}/.venv/bin/python",
|
||||
"cwd": "${workspaceFolder:cua-root}",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume"
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/python/core:${workspaceFolder:cua-root}/libs/python/computer:${workspaceFolder:cua-root}/libs/python/agent:${workspaceFolder:cua-root}/libs/python/som:${workspaceFolder:cua-root}/libs/python/pylume"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -84,7 +84,7 @@
|
||||
"python": "${workspaceFolder:cua-root}/.venv/bin/python",
|
||||
"cwd": "${workspaceFolder:cua-root}",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume"
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/python/core:${workspaceFolder:cua-root}/libs/python/computer:${workspaceFolder:cua-root}/libs/python/agent:${workspaceFolder:cua-root}/libs/python/som:${workspaceFolder:cua-root}/libs/python/pylume"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -106,27 +106,27 @@
|
||||
"python": "${workspaceFolder:cua-root}/.venv/bin/python",
|
||||
"cwd": "${workspaceFolder:cua-root}",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume"
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/python/core:${workspaceFolder:cua-root}/libs/python/computer:${workspaceFolder:cua-root}/libs/python/agent:${workspaceFolder:cua-root}/libs/python/som:${workspaceFolder:cua-root}/libs/python/pylume"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Run Computer Server",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/libs/computer-server/run_server.py",
|
||||
"program": "${workspaceFolder}/libs/python/computer-server/run_server.py",
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": true,
|
||||
"python": "${workspaceFolder:cua-root}/.venv/bin/python",
|
||||
"cwd": "${workspaceFolder:cua-root}",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer:${workspaceFolder:cua-root}/libs/agent:${workspaceFolder:cua-root}/libs/som:${workspaceFolder:cua-root}/libs/pylume"
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/python/core:${workspaceFolder:cua-root}/libs/python/computer:${workspaceFolder:cua-root}/libs/python/agent:${workspaceFolder:cua-root}/libs/python/som:${workspaceFolder:cua-root}/libs/python/pylume"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Run Computer Server with Args",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/libs/computer-server/run_server.py",
|
||||
"program": "${workspaceFolder}/libs/python/computer-server/run_server.py",
|
||||
"args": [
|
||||
"--host",
|
||||
"0.0.0.0",
|
||||
@@ -140,7 +140,7 @@
|
||||
"python": "${workspaceFolder:cua-root}/.venv/bin/python",
|
||||
"cwd": "${workspaceFolder:cua-root}",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/core:${workspaceFolder:cua-root}/libs/computer-server"
|
||||
"PYTHONPATH": "${workspaceFolder:cua-root}/libs/python/core:${workspaceFolder:cua-root}/libs/python/computer-server"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
36
.vscode/py.code-workspace
vendored
36
.vscode/py.code-workspace
vendored
@@ -6,27 +6,27 @@
|
||||
},
|
||||
{
|
||||
"name": "computer",
|
||||
"path": "../libs/computer"
|
||||
"path": "../libs/python/computer"
|
||||
},
|
||||
{
|
||||
"name": "agent",
|
||||
"path": "../libs/agent"
|
||||
"path": "../libs/python/agent"
|
||||
},
|
||||
{
|
||||
"name": "som",
|
||||
"path": "../libs/som"
|
||||
"path": "../libs/python/som"
|
||||
},
|
||||
{
|
||||
"name": "computer-server",
|
||||
"path": "../libs/computer-server"
|
||||
"path": "../libs/python/computer-server"
|
||||
},
|
||||
{
|
||||
"name": "pylume",
|
||||
"path": "../libs/pylume"
|
||||
"path": "../libs/python/pylume"
|
||||
},
|
||||
{
|
||||
"name": "core",
|
||||
"path": "../libs/core"
|
||||
"path": "../libs/python/core"
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
@@ -47,11 +47,11 @@
|
||||
"libs"
|
||||
],
|
||||
"python.analysis.extraPaths": [
|
||||
"${workspaceFolder:cua-root}/libs/core",
|
||||
"${workspaceFolder:cua-root}/libs/computer",
|
||||
"${workspaceFolder:cua-root}/libs/agent",
|
||||
"${workspaceFolder:cua-root}/libs/som",
|
||||
"${workspaceFolder:cua-root}/libs/pylume",
|
||||
"${workspaceFolder:cua-root}/libs/python/core",
|
||||
"${workspaceFolder:cua-root}/libs/python/computer",
|
||||
"${workspaceFolder:cua-root}/libs/python/agent",
|
||||
"${workspaceFolder:cua-root}/libs/python/som",
|
||||
"${workspaceFolder:cua-root}/libs/python/pylume",
|
||||
"${workspaceFolder:cua-root}/.vscode/typings"
|
||||
],
|
||||
"python.envFile": "${workspaceFolder:cua-root}/.env",
|
||||
@@ -99,11 +99,11 @@
|
||||
}
|
||||
],
|
||||
"python.autoComplete.extraPaths": [
|
||||
"${workspaceFolder:cua-root}/libs/core",
|
||||
"${workspaceFolder:cua-root}/libs/computer",
|
||||
"${workspaceFolder:cua-root}/libs/agent",
|
||||
"${workspaceFolder:cua-root}/libs/som",
|
||||
"${workspaceFolder:cua-root}/libs/pylume"
|
||||
"${workspaceFolder:cua-root}/libs/python/core",
|
||||
"${workspaceFolder:cua-root}/libs/python/computer",
|
||||
"${workspaceFolder:cua-root}/libs/python/agent",
|
||||
"${workspaceFolder:cua-root}/libs/python/som",
|
||||
"${workspaceFolder:cua-root}/libs/python/pylume"
|
||||
],
|
||||
"python.languageServer": "None",
|
||||
"[python]": {
|
||||
@@ -118,8 +118,8 @@
|
||||
"examples/agent_examples.py": "python"
|
||||
},
|
||||
"python.interpreterPaths": {
|
||||
"examples/computer_examples.py": "${workspaceFolder}/libs/computer/.venv/bin/python",
|
||||
"examples/agent_examples.py": "${workspaceFolder}/libs/agent/.venv/bin/python"
|
||||
"examples/computer_examples.py": "${workspaceFolder}/libs/python/computer/.venv/bin/python",
|
||||
"examples/agent_examples.py": "${workspaceFolder}/libs/python/agent/.venv/bin/python"
|
||||
}
|
||||
},
|
||||
"tasks": {
|
||||
|
||||
@@ -5,7 +5,7 @@ ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
||||
PYTHONPATH="/app/libs/core:/app/libs/computer:/app/libs/agent:/app/libs/som:/app/libs/pylume:/app/libs/computer-server"
|
||||
PYTHONPATH="/app/libs/python/core:/app/libs/python/computer:/app/libs/python/agent:/app/libs/python/som:/app/libs/python/pylume:/app/libs/python/computer-server:/app/libs/python/mcp-server"
|
||||
|
||||
# Install system dependencies for ARM architecture
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
||||
14
README.md
14
README.md
@@ -97,11 +97,11 @@ Or check out the [Usage Guide](#-usage-guide) to learn how to use our Python SDK
|
||||
|
||||
---
|
||||
|
||||
## Supported [Agent Loops](https://github.com/trycua/cua/blob/main/libs/agent/README.md#agent-loops)
|
||||
- [UITARS-1.5](https://github.com/trycua/cua/blob/main/libs/agent/README.md#agent-loops) - Run locally on Apple Silicon with MLX, or use cloud providers
|
||||
- [OpenAI CUA](https://github.com/trycua/cua/blob/main/libs/agent/README.md#agent-loops) - Use OpenAI's Computer-Use Preview model
|
||||
- [Anthropic CUA](https://github.com/trycua/cua/blob/main/libs/agent/README.md#agent-loops) - Use Anthropic's Computer-Use capabilities
|
||||
- [OmniParser-v2.0](https://github.com/trycua/cua/blob/main/libs/agent/README.md#agent-loops) - Control UI with [Set-of-Marks prompting](https://som-gpt4v.github.io/) using any vision model
|
||||
## Supported [Agent Loops](https://github.com/trycua/cua/blob/main/libs/python/agent/README.md#agent-loops)
|
||||
- [UITARS-1.5](https://github.com/trycua/cua/blob/main/libs/python/agent/README.md#agent-loops) - Run locally on Apple Silicon with MLX, or use cloud providers
|
||||
- [OpenAI CUA](https://github.com/trycua/cua/blob/main/libs/python/agent/README.md#agent-loops) - Use OpenAI's Computer-Use Preview model
|
||||
- [Anthropic CUA](https://github.com/trycua/cua/blob/main/libs/python/agent/README.md#agent-loops) - Use Anthropic's Computer-Use capabilities
|
||||
- [OmniParser-v2.0](https://github.com/trycua/cua/blob/main/libs/python/agent/README.md#agent-loops) - Control UI with [Set-of-Marks prompting](https://som-gpt4v.github.io/) using any vision model
|
||||
|
||||
## 🖥️ Compatibility
|
||||
|
||||
@@ -224,8 +224,8 @@ docker run -it --rm \
|
||||
|
||||
## Resources
|
||||
|
||||
- [How to use the MCP Server with Claude Desktop or other MCP clients](./libs/mcp-server/README.md) - One of the easiest ways to get started with C/ua
|
||||
- [How to use OpenAI Computer-Use, Anthropic, OmniParser, or UI-TARS for your Computer-Use Agent](./libs/agent/README.md)
|
||||
- [How to use the MCP Server with Claude Desktop or other MCP clients](./libs/python/mcp-server/README.md) - One of the easiest ways to get started with C/ua
|
||||
- [How to use OpenAI Computer-Use, Anthropic, OmniParser, or UI-TARS for your Computer-Use Agent](./libs/python/agent/README.md)
|
||||
- [How to use Lume CLI for managing desktops](./libs/lume/README.md)
|
||||
- [Training Computer-Use Models: Collecting Human Trajectories with C/ua (Part 1)](https://www.trycua.com/blog/training-computer-use-models-trajectories-1)
|
||||
- [Build Your Own Operator on macOS (Part 1)](https://www.trycua.com/blog/build-your-own-operator-on-macos-1)
|
||||
|
||||
@@ -4,13 +4,20 @@
|
||||
|
||||
The project is organized as a monorepo with these main packages:
|
||||
|
||||
- `libs/core/` - Base package with telemetry support
|
||||
- `libs/computer/` - Computer-use interface (CUI) library
|
||||
- `libs/agent/` - AI agent library with multi-provider support
|
||||
- `libs/som/` - Set-of-Mark parser
|
||||
- `libs/computer-server/` - Server component for VM
|
||||
### Python
|
||||
- `libs/python/core/` - Base package with telemetry support
|
||||
- `libs/python/computer/` - Computer-use interface (CUI) library
|
||||
- `libs/python/agent/` - AI agent library with multi-provider support
|
||||
- `libs/python/som/` - Set-of-Mark parser
|
||||
- `libs/python/computer-server/` - Server component for VM
|
||||
- `libs/python/pylume/` - Python bindings for Lume
|
||||
|
||||
### TypeScript
|
||||
- `libs/typescript/computer/` - Computer-use interface (CUI) library
|
||||
- `libs/typescript/agent/` - AI agent library with multi-provider support
|
||||
|
||||
### Other
|
||||
- `libs/lume/` - Lume CLI
|
||||
- `libs/pylume/` - Python bindings for Lume
|
||||
|
||||
Each package has its own virtual environment and dependencies, managed through PDM.
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ This will install:
|
||||
If you want to simplify installation, you can use this one-liner to download and run the installation script:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/mcp-server/scripts/install_mcp_server.sh | bash
|
||||
curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/python/mcp-server/scripts/install_mcp_server.sh | bash
|
||||
```
|
||||
|
||||
This script will:
|
||||
@@ -84,7 +84,7 @@ If you want to develop with the cua-mcp-server directly without installation, yo
|
||||
"mcpServers": {
|
||||
"cua-agent": {
|
||||
"command": "/bin/bash",
|
||||
"args": ["~/cua/libs/mcp-server/scripts/start_mcp_server.sh"],
|
||||
"args": ["~/cua/libs/python/mcp-server/scripts/start_mcp_server.sh"],
|
||||
"env": {
|
||||
"CUA_AGENT_LOOP": "UITARS",
|
||||
"CUA_MODEL_PROVIDER": "OAICOMPAT",
|
||||
@@ -106,7 +106,7 @@ Just add this to your MCP client's configuration and it will use your local deve
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
If you get a `/bin/bash: ~/cua/libs/mcp-server/scripts/start_mcp_server.sh: No such file or directory` error, try changing the path to the script to be absolute instead of relative.
|
||||
If you get a `/bin/bash: ~/cua/libs/python/mcp-server/scripts/start_mcp_server.sh: No such file or directory` error, try changing the path to the script to be absolute instead of relative.
|
||||
|
||||
To see the logs:
|
||||
```
|
||||
|
||||
@@ -8,7 +8,7 @@ CUA_REPO_DIR="$( cd "$SCRIPT_DIR/../../.." &> /dev/null && pwd )"
|
||||
PYTHON_PATH="${CUA_REPO_DIR}/.venv/bin/python"
|
||||
|
||||
# Set Python path to include all necessary libraries
|
||||
export PYTHONPATH="${CUA_REPO_DIR}/libs/mcp-server:${CUA_REPO_DIR}/libs/agent:${CUA_REPO_DIR}/libs/computer:${CUA_REPO_DIR}/libs/core:${CUA_REPO_DIR}/libs/pylume"
|
||||
export PYTHONPATH="${CUA_REPO_DIR}/libs/python/mcp-server:${CUA_REPO_DIR}/libs/python/agent:${CUA_REPO_DIR}/libs/python/computer:${CUA_REPO_DIR}/libs/python/core:${CUA_REPO_DIR}/libs/python/pylume"
|
||||
|
||||
# Run the MCP server directly as a module
|
||||
$PYTHON_PATH -m mcp_server.server
|
||||
@@ -49,7 +49,7 @@
|
||||
"# If locally installed, use this instead:\n",
|
||||
"import os\n",
|
||||
"\n",
|
||||
"os.chdir('../libs/agent')\n",
|
||||
"os.chdir('../libs/python/agent')\n",
|
||||
"!poetry install\n",
|
||||
"!poetry build\n",
|
||||
"\n",
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"source": [
|
||||
"import os\n",
|
||||
"\n",
|
||||
"os.chdir('../libs/computer')\n",
|
||||
"os.chdir('../libs/python/computer')\n",
|
||||
"!poetry install\n",
|
||||
"!poetry build\n",
|
||||
"\n",
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"# If locally installed, use this instead:\n",
|
||||
"import os\n",
|
||||
"\n",
|
||||
"os.chdir('../libs/computer-server')\n",
|
||||
"os.chdir('../libs/python/computer-server')\n",
|
||||
"!pdm install\n",
|
||||
"!pdm build\n",
|
||||
"\n",
|
||||
@@ -109,7 +109,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.7"
|
||||
"version": "3.12.2"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
@@ -24,12 +24,12 @@ distribution = false
|
||||
|
||||
[tool.pdm.dev-dependencies]
|
||||
dev = [
|
||||
"-e agent @ file:///${PROJECT_ROOT}/libs/agent",
|
||||
"-e computer @ file:///${PROJECT_ROOT}/libs/computer",
|
||||
"-e computer-server @ file:///${PROJECT_ROOT}/libs/computer-server",
|
||||
"-e cua-som @ file:///${PROJECT_ROOT}/libs/som",
|
||||
"-e mcp-server @ file:///${PROJECT_ROOT}/libs/mcp-server",
|
||||
"-e pylume @ file:///${PROJECT_ROOT}/libs/pylume",
|
||||
"-e agent @ file:///${PROJECT_ROOT}/libs/python/agent",
|
||||
"-e computer @ file:///${PROJECT_ROOT}/libs/python/computer",
|
||||
"-e computer-server @ file:///${PROJECT_ROOT}/libs/python/computer-server",
|
||||
"-e cua-som @ file:///${PROJECT_ROOT}/libs/python/som",
|
||||
"-e mcp-server @ file:///${PROJECT_ROOT}/libs/python/mcp-server",
|
||||
"-e pylume @ file:///${PROJECT_ROOT}/libs/python/pylume",
|
||||
"black>=23.0.0",
|
||||
"ipykernel>=6.29.5",
|
||||
"jedi>=0.19.2",
|
||||
|
||||
@@ -123,25 +123,25 @@ function Install-Package {
|
||||
Print-Step "Installing packages in development mode..."
|
||||
|
||||
# Install core first (base package with telemetry support)
|
||||
if (-not (Install-Package "libs/core" "core")) { exit 1 }
|
||||
if (-not (Install-Package "libs/python/core" "core")) { exit 1 }
|
||||
|
||||
# Install pylume (base dependency)
|
||||
if (-not (Install-Package "libs/pylume" "pylume")) { exit 1 }
|
||||
if (-not (Install-Package "libs/python/pylume" "pylume")) { exit 1 }
|
||||
|
||||
# Install computer with all its dependencies and extras
|
||||
if (-not (Install-Package "libs/computer" "computer" "all")) { exit 1 }
|
||||
if (-not (Install-Package "libs/python/computer" "computer" "all")) { exit 1 }
|
||||
|
||||
# Install omniparser
|
||||
if (-not (Install-Package "libs/som" "som")) { exit 1 }
|
||||
if (-not (Install-Package "libs/python/som" "som")) { exit 1 }
|
||||
|
||||
# Install agent with all its dependencies and extras
|
||||
if (-not (Install-Package "libs/agent" "agent" "all")) { exit 1 }
|
||||
if (-not (Install-Package "libs/python/agent" "agent" "all")) { exit 1 }
|
||||
|
||||
# Install computer-server
|
||||
if (-not (Install-Package "libs/computer-server" "computer-server")) { exit 1 }
|
||||
if (-not (Install-Package "libs/python/computer-server" "computer-server")) { exit 1 }
|
||||
|
||||
# Install mcp-server
|
||||
if (-not (Install-Package "libs/mcp-server" "mcp-server")) { exit 1 }
|
||||
if (-not (Install-Package "libs/python/mcp-server" "mcp-server")) { exit 1 }
|
||||
|
||||
# Install development tools from root project
|
||||
Print-Step "Installing development dependencies..."
|
||||
@@ -149,7 +149,7 @@ pip install -e ".[dev,test,docs]"
|
||||
|
||||
# Create a .env file for VS Code to use the virtual environment
|
||||
Print-Step "Creating .env file for VS Code..."
|
||||
$pythonPath = "$PROJECT_ROOT/libs/core;$PROJECT_ROOT/libs/computer;$PROJECT_ROOT/libs/agent;$PROJECT_ROOT/libs/som;$PROJECT_ROOT/libs/pylume;$PROJECT_ROOT/libs/computer-server;$PROJECT_ROOT/libs/mcp-server"
|
||||
$pythonPath = "$PROJECT_ROOT/libs/python/core;$PROJECT_ROOT/libs/python/computer;$PROJECT_ROOT/libs/python/agent;$PROJECT_ROOT/libs/python/som;$PROJECT_ROOT/libs/python/pylume;$PROJECT_ROOT/libs/python/computer-server;$PROJECT_ROOT/libs/python/mcp-server"
|
||||
"PYTHONPATH=$pythonPath" | Out-File -FilePath ".env" -Encoding UTF8
|
||||
|
||||
Print-Success "All packages installed successfully!"
|
||||
|
||||
@@ -87,25 +87,25 @@ install_package() {
|
||||
print_step "Installing packages in development mode..."
|
||||
|
||||
# Install core first (base package with telemetry support)
|
||||
install_package "libs/core" "core"
|
||||
install_package "libs/python/core" "core"
|
||||
|
||||
# Install pylume (base dependency)
|
||||
install_package "libs/pylume" "pylume"
|
||||
install_package "libs/python/pylume" "pylume"
|
||||
|
||||
# Install computer with all its dependencies and extras
|
||||
install_package "libs/computer" "computer" "all"
|
||||
install_package "libs/python/computer" "computer" "all"
|
||||
|
||||
# Install omniparser
|
||||
install_package "libs/som" "som"
|
||||
install_package "libs/python/som" "som"
|
||||
|
||||
# Install agent with all its dependencies and extras
|
||||
install_package "libs/agent" "agent" "all"
|
||||
install_package "libs/python/agent" "agent" "all"
|
||||
|
||||
# Install computer-server
|
||||
install_package "libs/computer-server" "computer-server"
|
||||
install_package "libs/python/computer-server" "computer-server"
|
||||
|
||||
# Install mcp-server
|
||||
install_package "libs/mcp-server" "mcp-server"
|
||||
install_package "libs/python/mcp-server" "mcp-server"
|
||||
|
||||
# Install development tools from root project
|
||||
print_step "Installing development dependencies..."
|
||||
@@ -113,7 +113,7 @@ pip install -e ".[dev,test,docs]"
|
||||
|
||||
# Create a .env file for VS Code to use the virtual environment
|
||||
print_step "Creating .env file for VS Code..."
|
||||
echo "PYTHONPATH=${PROJECT_ROOT}/libs/core:${PROJECT_ROOT}/libs/computer:${PROJECT_ROOT}/libs/agent:${PROJECT_ROOT}/libs/som:${PROJECT_ROOT}/libs/pylume:${PROJECT_ROOT}/libs/computer-server:${PROJECT_ROOT}/libs/mcp-server" > .env
|
||||
echo "PYTHONPATH=${PROJECT_ROOT}/libs/python/core:${PROJECT_ROOT}/libs/python/computer:${PROJECT_ROOT}/libs/python/agent:${PROJECT_ROOT}/libs/python/som:${PROJECT_ROOT}/libs/python/pylume:${PROJECT_ROOT}/libs/python/computer-server:${PROJECT_ROOT}/libs/python/mcp-server" > .env
|
||||
|
||||
print_success "All packages installed successfully!"
|
||||
print_step "Your virtual environment is ready. To activate it:"
|
||||
|
||||
@@ -43,7 +43,7 @@ else
|
||||
fi
|
||||
|
||||
# Environment variables
|
||||
PYTHONPATH="/app/libs/core:/app/libs/computer:/app/libs/agent:/app/libs/som:/app/libs/pylume:/app/libs/computer-server"
|
||||
PYTHONPATH="/app/libs/python/core:/app/libs/python/computer:/app/libs/python/agent:/app/libs/python/som:/app/libs/python/pylume:/app/libs/python/computer-server:/app/libs/python/mcp-server"
|
||||
|
||||
# Check if Docker is installed
|
||||
if ! command -v docker &> /dev/null; then
|
||||
|
||||
Reference in New Issue
Block a user