MindSearch
MindSearch copied to clipboard
Optimize File System Management for Docker Launcher and Resolve class_registry Dependency Issue
Optimize File System Management for Docker Launcher and Resolve class_registry Dependency Issue
This PR focuses on two improvements for the Docker launcher, without affecting the core logic of MindSearch:
- Addition of a FileSystemManager class to optimize file system operations in the Docker launcher
- Inclusion of class_registry installation command in the Dockerfile to resolve dependency issues
Detailed Changes
-
File System Management Optimization for Docker Launcher
- Added
FileSystemManagerclass withensure_dirandensure_filemethods - These methods ensure necessary directories and files exist in the Docker environment, creating them if they don't
- Improved code structure of the Docker launcher, enhancing reliability and maintainability of file system operations
- Added
-
Docker Image Dependency Resolution
- Added
pip install class_registrycommand to the Dockerfile - Resolved the
ImportError: cannot import name 'AutoRegister' from 'class_registry'error occurring in Docker containers - Ensured correct importation of required dependencies for the lagent library in the Docker environment
- Added
优化Docker启动器的文件系统管理并解决class_registry依赖问题
本次PR主要针对Docker启动器进行了两个方面的改进,不涉及MindSearch的核心逻辑:
- 新增 FileSystemManager 类以优化Docker启动器的文件系统操作
- 在 Dockerfile 中添加 class_registry 的安装命令以解决依赖问题
详细改动
-
Docker启动器文件系统管理优化
- 新增
FileSystemManager类,提供了ensure_dir和ensure_file方法 - 这些方法用于确保Docker环境中必要的目录和文件存在,如果不存在则创建
- 优化了Docker启动器的代码结构,提高了文件系统操作的可靠性和可维护性
- 新增
-
Docker镜像依赖问题解决
- 在 Dockerfile 中新增
pip install class_registry命令 - 解决了Docker容器中出现的
ImportError: cannot import name 'AutoRegister' from 'class_registry'错误 - 确保在Docker环境中 lagent 库能够正确导入所需的依赖
- 在 Dockerfile 中新增