[Feature] Support no volume mount with Sandbox Server and distributed K8S deployment#36
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for running Sandbox Server without volume mounting by making the default_mount_dir configuration optional and updating the initialization logic to handle cases where no mount directory is specified.
- Removes the requirement for
default_mount_dirto be set in the validation - Updates the SandboxManager initialization to create a default config when none is provided
- Adds conditional logic throughout the codebase to handle operations when no mount directory exists
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/agentscope_runtime/sandbox/model/manager_config.py |
Removes validation requiring default_mount_dir and removes the default config constant |
src/agentscope_runtime/sandbox/model/__init__.py |
Removes export of the deleted DEFAULT_LOCAL_MANAGER_CONFIG constant |
src/agentscope_runtime/sandbox/manager/sandbox_manager.py |
Updates initialization logic to handle optional config and adds conditional volume mounting throughout container lifecycle |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
This PR enables the Sandbox Server to operate without volume mounting, allowing for containers to run without persistent local storage. The changes remove mandatory volume mounting requirements and add support for dynamic IP resolution in containerized environments.
- Removes the requirement for
default_mount_dirto be set, making it optional - Updates container creation logic to handle cases with no volume mounting
- Adds dynamic IP resolution for container connectivity instead of hardcoded localhost
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/agentscope_runtime/sandbox/model/manager_config.py | Removes validation requiring default_mount_dir and removes default config constant |
| src/agentscope_runtime/sandbox/model/init.py | Updates exports to remove the deleted default config constant |
| src/agentscope_runtime/sandbox/manager/server/app.py | Adds logging configuration setup functionality |
| src/agentscope_runtime/sandbox/manager/sandbox_manager.py | Updates container creation to support no volume mounting and dynamic IP resolution |
| src/agentscope_runtime/sandbox/manager/container_clients/kubernetes_client.py | Enhances Kubernetes client with node IP detection and proper service creation |
| src/agentscope_runtime/sandbox/manager/container_clients/docker_client.py | Updates Docker client to return IP information for consistency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Description
Type of Change
Component(s) Affected
Checklist