name: bytebot services: bytebot-desktop: # Build from source with OpenCV 4.8.0 build: context: .. dockerfile: packages/bytebotd/Dockerfile shm_size: "2g" container_name: bytebot-desktop restart: unless-stopped hostname: computer privileged: true ports: - "9990:9990" # bytebotd service & noVNC - "8081:8081" # progress websocket environment: - DISPLAY=:0 - BYTEBOT_GRID_OVERLAY=true - BYTEBOT_GRID_DEBUG=false - BYTEBOT_PROGRESSIVE_ZOOM_USE_AI=true - BYTEBOT_UNIVERSAL_TEACHING=${BYTEBOT_UNIVERSAL_TEACHING:-true} - BYTEBOT_ADAPTIVE_CALIBRATION=${BYTEBOT_ADAPTIVE_CALIBRATION:-true} - BYTEBOT_ZOOM_REFINEMENT=${BYTEBOT_ZOOM_REFINEMENT:-true} - BYTEBOT_COORDINATE_METRICS=${BYTEBOT_COORDINATE_METRICS:-true} - BYTEBOT_POST_CLICK_CALIBRATION=true - BYTEBOT_DRIFT_COMPENSATION=true - BYTEBOT_DRIFT_SMOOTHING=0.2 # Accuracy aids - BYTEBOT_PRECLICK_SNAP=true - BYTEBOT_SNAP_RADIUS=6 - BYTEBOT_SNAP_PENALTY=0.25 - BYTEBOT_CLICK_RETRY_ON_NOCHANGE=true - BYTEBOT_CLICK_VERIFY_DELAY=250 - BYTEBOT_CLICK_VERIFY_RADIUS=12 - BYTEBOT_CLICK_VERIFY_THRESHOLD=4.0 - BYTEBOT_CLICK_RETRY_MAX=1 # OmniParser integration - BYTEBOT_CV_USE_OMNIPARSER=${BYTEBOT_CV_USE_OMNIPARSER:-true} - OMNIPARSER_URL=${OMNIPARSER_URL:-http://bytebot-omniparser:9989} - OMNIPARSER_TIMEOUT=${OMNIPARSER_TIMEOUT:-30000} depends_on: bytebot-omniparser: condition: service_healthy networks: - bytebot-network postgres: image: ${BYTEBOT_POSTGRES_IMAGE:-public.ecr.aws/docker/library/postgres:16-alpine} container_name: bytebot-postgres restart: unless-stopped ports: - "5432:5432" environment: - POSTGRES_PASSWORD=postgres - POSTGRES_USER=postgres - POSTGRES_DB=bytebotdb networks: - bytebot-network volumes: - postgres_data:/var/lib/postgresql/data bytebot-agent: build: context: .. dockerfile: packages/bytebot-agent/Dockerfile container_name: bytebot-agent restart: unless-stopped ports: - "9991:9991" environment: - DATABASE_URL=${DATABASE_URL:-postgresql://postgres:postgres@postgres:5432/bytebotdb} - BYTEBOT_DESKTOP_BASE_URL=${BYTEBOT_DESKTOP_BASE_URL:-http://bytebot-desktop:9990} - BYTEBOT_LLM_PROXY_URL=${BYTEBOT_LLM_PROXY_URL:-http://bytebot-llm-proxy:4000} - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} - OPENAI_API_KEY=${OPENAI_API_KEY} - GEMINI_API_KEY=${GEMINI_API_KEY} - OPENROUTER_API_KEY=${OPENROUTER_API_KEY} - BYTEBOT_ZOOM_REFINEMENT=${BYTEBOT_ZOOM_REFINEMENT:-true} - BYTEBOT_GRID_OVERLAY=true - BYTEBOT_PROGRESSIVE_ZOOM_USE_AI=true # Agent-side verification + screenshot policy - BYTEBOT_CLICK_VERIFY=true - BYTEBOT_POST_ACTION_SCREENSHOT=true - BYTEBOT_INCLUDE_FULL_AFTER_VERIFY=true # OmniParser integration - BYTEBOT_CV_USE_OMNIPARSER=${BYTEBOT_CV_USE_OMNIPARSER:-true} - OMNIPARSER_URL=${OMNIPARSER_URL:-http://bytebot-omniparser:9989} - OMNIPARSER_TIMEOUT=${OMNIPARSER_TIMEOUT:-30000} depends_on: postgres: condition: service_started bytebot-omniparser: condition: service_healthy networks: - bytebot-network bytebot-ui: build: context: .. dockerfile: packages/bytebot-ui/Dockerfile args: - BYTEBOT_AGENT_BASE_URL=${BYTEBOT_AGENT_BASE_URL:-http://bytebot-agent:9991} - BYTEBOT_DESKTOP_VNC_URL=${BYTEBOT_DESKTOP_VNC_URL:-http://bytebot-desktop:9990/websockify} # Use pre-built image image: ghcr.io/bytebot-ai/bytebot-ui:edge container_name: bytebot-ui restart: unless-stopped ports: - "9992:9992" environment: - NODE_ENV=production - BYTEBOT_AGENT_BASE_URL=${BYTEBOT_AGENT_BASE_URL:-http://bytebot-agent:9991} - BYTEBOT_DESKTOP_VNC_URL=${BYTEBOT_DESKTOP_VNC_URL:-http://bytebot-desktop:9990/websockify} - NEXT_PUBLIC_PROGRESS_WS_PORT=${NEXT_PUBLIC_PROGRESS_WS_PORT:-8081} depends_on: - bytebot-agent networks: - bytebot-network bytebot-omniparser: build: context: ../packages/bytebot-omniparser dockerfile: Dockerfile container_name: bytebot-omniparser restart: unless-stopped ports: - "9989:9989" environment: - OMNIPARSER_HOST=0.0.0.0 - OMNIPARSER_PORT=9989 # Device auto-detection: 'auto' detects cuda/cpu in container # On Apple Silicon: Docker uses CPU (MPS not available in containers) # On NVIDIA: Docker uses CUDA if nvidia-docker runtime available # Override with: cpu, cuda - OMNIPARSER_DEVICE=${OMNIPARSER_DEVICE:-auto} - OMNIPARSER_MIN_CONFIDENCE=${OMNIPARSER_MIN_CONFIDENCE:-0.3} - OMNIPARSER_MODEL_DTYPE=${OMNIPARSER_MODEL_DTYPE:-float16} volumes: # Optional: mount weights to persist across rebuilds - omniparser_weights:/app/weights networks: - bytebot-network # GPU support configured in docker-compose.override.yml (automatically loaded) # Requires: nvidia-container-toolkit installed on host # Apple Silicon: MPS not available in Docker, runs on CPU (for GPU use native setup) healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9989/health"] interval: 30s timeout: 10s retries: 3 start_period: 60s networks: bytebot-network: driver: bridge volumes: postgres_data: omniparser_weights: