Skip to content

This PR resolves multiple Docker build failures with latest changes to coleam00/Archon upstream repo, and fixes small issue with local testing configuration#4

Merged
dapperdivers merged 27 commits intodapperdivers:mainfrom
stevepresley:localbuild
Sep 5, 2025

Conversation

@stevepresley
Copy link
Copy Markdown
Contributor

🐛 Build Fixes

  • Fixed Python version mismatch: Updated all Dockerfiles from Python 3.11 to 3.12 to match upstream
    requirements
  • Fixed dependency management: Changed from missing requirements.*.txt files to pyproject.toml +
    uv.lock
  • Fixed MCP directory path: Updated MCP Dockerfile to use src/mcp_server/ instead of src/mcp/ to
    match upstream structure
  • Fixed Playwright installation: Changed from playwright install to python -m playwright install to
    resolve command not found errors

🧪 Testing Improvements

  • Fixed test script paths: Updated test-containers.sh to use correct Docker Compose file paths
  • Fixed Docker Compose paths: Updated docker-compose.test.yml to use correct absolute paths for
    Dockerfiles
  • Removed obsolete version: Cleaned up Docker Compose version warnings

✅ Validation

  • Local testing: All containers build and run successfully in local test environment
  • GitHub Actions: Confirmed successful builds against upstream coleam00/Archon repository
  • All four components: Server, MCP, Agents, and Frontend all building successfully

Test Plan

  • Local container builds with ./tests/test-containers.sh
  • GitHub Actions builds pass for all components
  • All Dockerfile syntax and paths validated
  • Upstream repository compatibility confirmed

Files Changed

  • dockerfiles/server/Dockerfile - Python 3.12, pyproject.toml, Playwright fixes
  • dockerfiles/mcp/Dockerfile - Directory path and dependency fixes
  • dockerfiles/agents/Dockerfile - Python 3.12 and dependency fixes
  • tests/test-containers.sh - Path resolution fixes
  • tests/docker-compose.test.yml - Dockerfile path corrections
  • .github/workflows/build-images.yml - Workflow cleanup

dapperdivers and others added 27 commits August 18, 2025 19:39
Project housekeeping: Updated .gitignore and .env.example environment template
The upstream Archon repository uses 'mcp_server' directory name,
not 'mcp'. Updated Dockerfile to use correct source paths:
- src/mcp/ -> src/mcp_server/
- Updated CMD to use src.mcp_server.mcp_server module path

This resolves the build failure: "failed to compute cache key:
failed to calculate checksum of ref... '/src/mcp': not found"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ailure

Fix MCP Dockerfile directory path
The upstream Archon repository uses pyproject.toml for dependency
management, not separate requirements.*.txt files. Updated all
Dockerfiles to:

- Copy pyproject.toml and uv.lock instead of requirements files
- Use `pip install -e .` for editable installation
- This resolves build failures looking for non-existent requirements files

Fixes:
- requirements.server.txt not found
- requirements.agents.txt not found
- requirements.mcp.txt not found

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
The upstream Archon pyproject.toml requires Python >=3.12, but
our Dockerfiles were using Python 3.11, causing pip install
failures. Updated all Dockerfiles to use Python 3.12:

- server: python:3.12 (build) and python:3.12-slim (runtime)
- mcp: python:3.12-slim
- agents: python:3.12-slim

This resolves the "pip install -e ." build failures.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Updated PYTHONPATH to use python3.12 instead of python3.11
- Added explicit PYTHONPATH to playwright install command to ensure
  it can find the installed packages
- This resolves the Playwright chromium installation failure

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Changed from 'playwright install chromium' to 'python -m playwright install chromium'
to ensure it uses the Python module directly rather than trying to find
the playwright executable, which may not be in PATH.

This should resolve the exit code 127 (command not found) error.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Playwright chromium installation is failing during build with exit code 1.
Skip browser installation during build phase - browsers can be installed
at runtime if needed by the application.

This allows the Docker build to complete successfully while preserving
the Playwright functionality for runtime use.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Instead of removing Playwright browsers, install the required system
dependencies first using 'playwright install-deps chromium' before
installing the browser itself.

This should resolve the installation failure while preserving the
required Playwright functionality for web crawling.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Changed to use 'playwright install chromium' directly (without python -m)
to match the upstream Dockerfile approach. Removed install-deps step
that may have been causing issues.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Exit code 127 indicates 'playwright' command not found. Install
playwright in runtime stage before attempting to install browsers.
This ensures the playwright command is available in the runtime
environment.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
The test script was looking for docker-compose.test.yml in the wrong
location when run from project root. Updated all references to use
the correct path relative to the script directory.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Reverted to using the upstream Archon repository now that all
build issues have been resolved:
- Python 3.12 compatibility
- pyproject.toml dependency management
- Playwright installation fixes
- MCP directory path corrections

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Removed commented lines from build workflow files now that
upstream repository build is confirmed working.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)
This PR resolves multiple Docker build failures with latest changes to coleam00/Archon upstream repo, and fixes small issue with local testing configuration
Updated Dockerfiles to install the correct dependency groups from
pyproject.toml instead of just base dependencies:

- server: Install [server] group to get uvicorn, FastAPI, etc.
- agents: Install [agents] group for agent-specific dependencies
- mcp: Install [mcp] group for MCP service dependencies

This resolves "No module named uvicorn" and other missing dependency errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Playwright should already be included in the [server] dependency group
from pyproject.toml, so the separate pip install is redundant.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Analysis of actual imports and copied files revealed that services
import modules from each other:

- MCP copies server service files, needs [server] dependencies
- Agents may use server utilities, needs [server] dependencies
- Server already had [server] group correctly

Updated to install multiple dependency groups where needed:
- MCP: [mcp,server]
- Agents: [agents,server]
- Server: [server] (unchanged)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This PR resolves multiple critical issues preventing successful Docker builds:

## Core Fixes
- **Dependency Groups Syntax**: Update all Dockerfiles to use correct `--group server` syntax instead of deprecated `.[server]` extras syntax
- **Pip Version**: Upgrade pip in all containers to support new dependency-groups feature (pip 25.1+)
- **No-Cache Build**: Add `no-cache: true` to workflow to prevent Docker layer caching issues during debugging

## Container Updates
- **Server**: Remove manual playwright installation (comes from crawl4ai dependency)
- **MCP**: Fix dependency installation with correct syntax
- **Agents**: Fix dependency installation with correct syntax
- **All**: Add proper build versioning system for cache management

## Documentation Improvements
- **README.md**: Add missing environment variables for MCP and Agents services
- **Port Configuration**: Ensure consistent port mappings in examples

## Background
The upstream Archon repo switched to using `[dependency-groups]` structure in pyproject.toml, but the Docker builds were still using the old optional-dependencies syntax `.[server]`. This caused builds to succeed but with missing critical dependencies like crawl4ai and playwright.

The fix required:
1. Understanding the new dependency-groups specification (PEP 735)
2. Using the correct pip syntax: `pip install -e . --group server`
3. Upgrading pip to version 25.1+ to support the --group option
4. Adding no-cache flag to force rebuilds during debugging

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@stevepresley
Copy link
Copy Markdown
Contributor Author

There were some dependency syntax issues created in this PR - initial PR only addressed the playwright issues, but there was a syntax issue installing the server dependencies that were changed in the upstream repo here: coleam00/Archon#533

build:
context: /tmp/archon-source/python
dockerfile: /home/derek/projects/archon-images/dockerfiles/agents/Dockerfile
dockerfile: /Volumes/Storage/Projects/archon-images/dockerfiles/agents/Dockerfile
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should likely move this to a relative path

@dapperdivers dapperdivers merged commit 171d7b8 into dapperdivers:main Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants