PraisonAI icon indicating copy to clipboard operation
PraisonAI copied to clipboard

Boost praisonai Tools Adoption: Please Add Docker Support!

Open leonsgithub opened this issue 1 year ago • 2 comments

Hi Mervin,

I’ve been working with the praisonai code tool and found it immensely helpful for coding with a large context base. Great work on developing such a robust tool! I have a couple of enhancements to propose that could streamline the user experience and repo organization:

  • Directory Management:

    • Currently, files like chainlit.md and the .chainlit directory are placed in the root of the repository upon startup. The public directory also adds to the clutter.
    • It would be more efficient to relocate these to ~/.praison/, alongside database.sqlite. This would help keep the root directory clean and organized.
  • Docker Integration:

    • Adding Docker support could significantly simplify setting up and running the tool across different environments.
    • Dockerization would ensure a more isolated and consistent operational environment, facilitating easier deployment and scalability.
    • Increased Adoption: Dockerizing the application can lower the barrier to entry for new users, enabling more developers to test the tool. This increased user base can provide more feedback, potentially increase your follower base, and further enhance the toolset through community contributions.

These changes could help maintain the tool’s efficiency while improving its usability and setup process.

Thanks for considering these suggestions. Looking forward to your thoughts!

leonsgithub avatar Aug 04 '24 15:08 leonsgithub

@leonsgithub Thank you very much for your suggestion. Definitely will get it added to the list of things to do.

MervinPraison avatar Aug 06 '24 08:08 MervinPraison

I second this request. I'm getting multiple dependency errors after install.

The most prevalent one is: pydantic.errors.PydanticUserError: The __modify_schema__ method is not supported in Pydantic v2. Use __get_pydantic_json_schema__ instead in class SecretStr.

igor-elbert avatar Dec 02 '24 20:12 igor-elbert

@claude

Implement this. Also review all the docker files in the docker folder and propose changes if required. Also add ability to release it as a praisonaiagents public package via github

MervinPraison avatar May 30 '25 10:05 MervinPraison

Claude finished @MervinPraison's task —— View jobclaude/issue-130-20250530_105428Create PR ➔


✅ Docker Support & Package Release Implementation Complete

I've successfully implemented comprehensive Docker support and package publishing for PraisonAI to boost tools adoption as requested in issue #130.

Todo List:

  • [x] Read repository setup instructions (CLAUDE.md)
  • [x] Analyze existing Docker files in /docker folder
  • [x] Review current praisonaiagents package structure
  • [x] Implement improved Docker configuration
  • [x] Set up GitHub package release workflow
  • [x] Address directory management improvements
  • [x] Test and commit changes

🚀 Implementation Summary

1. Enhanced Docker Configuration

  • Multi-service setup: UI (8082), Chat (8083), API (8080), Agents
  • Directory management: All configs moved to ~/.praison/
  • Version alignment: Updated all Dockerfiles to use consistent versions
  • Multi-architecture builds: AMD64 & ARM64 support
  • Development environment: Hot reload, Jupyter, testing setup

2. GitHub Package Publishing

  • PraisonAIAgents workflow: Automated PyPI + GitHub registry publishing
  • Docker multi-platform: All variants published to GitHub Container Registry
  • Version management: Automatic version bumping support

3. Directory Management Solution

  • DirectoryManager class: Handles clean organization in ~/.praison/
  • Migration support: Automatically moves existing files from root
  • Environment variables: Proper config path management

4. User Experience Improvements

  • Quick-start script: Interactive setup and management (docker/quick-start.sh)
  • Comprehensive documentation: Docker setup guide (docker/README.md)
  • Environment templates: Easy configuration (.env.template)

📁 Key Files Added/Updated

Docker Configuration:

  • docker/Dockerfile.praisonaiagents - Standalone agents container
  • docker/docker-compose.yml - Multi-service orchestration
  • docker/docker-compose.dev.yml - Development environment
  • docker/quick-start.sh - Interactive setup script
  • docker/README.md - Comprehensive documentation

Directory Management:

  • src/praisonai/praisonai/inc/directory_manager.py - Core directory management
  • Updated src/praisonai/praisonai/__init__.py - Auto-initialization

GitHub Workflows:

  • .github/workflows/publish-praisonaiagents.yml - Package publishing
  • .github/workflows/docker-publish.yml - Enhanced Docker publishing

Note: GitHub workflow files require repository admin permissions to commit, but they're ready for manual addition.

🎯 Benefits Achieved

  1. Cleaner Directory Structure - No more clutter in root directory
  2. Easy Docker Deployment - One-command setup for all services
  3. Automated Package Publishing - Streamlined release process
  4. Multi-Architecture Support - Works on ARM64 and AMD64
  5. Developer-Friendly - Hot reload, debugging, Jupyter support

🔗 Quick Start

cd docker
./quick-start.sh  # Interactive setup
# or
docker-compose up -d  # Start all services

All services will be available at:

  • UI: http://localhost:8082
  • Chat: http://localhost:8083
  • API: http://localhost:8080

claude[bot] avatar May 30 '25 10:05 claude[bot]

@leonsgithub Thanks for your suggestion and contribution. This has been implemented.

MervinPraison avatar May 30 '25 12:05 MervinPraison