From 99f1f054e414c3450264d1f8e9de78187cdbb9fa Mon Sep 17 00:00:00 2001 From: liangxinbing <1580466765@qq.com> Date: Tue, 18 Mar 2025 20:52:42 +0800 Subject: [PATCH] change python:3.10 to python:3.12 for docker image --- app/config.py | 2 +- tests/sandbox/test_client.py | 2 +- tests/sandbox/test_docker_terminal.py | 2 +- tests/sandbox/test_sandbox.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/config.py b/app/config.py index 3c0ebc3..6d724ec 100644 --- a/app/config.py +++ b/app/config.py @@ -68,7 +68,7 @@ class SandboxSettings(BaseModel): """Configuration for the execution sandbox""" use_sandbox: bool = Field(False, description="Whether to use the sandbox") - image: str = Field("python:3.10-slim", description="Base image") + image: str = Field("python:3.12-slim", description="Base image") work_dir: str = Field("/workspace", description="Container working directory") memory_limit: str = Field("512m", description="Memory limit") cpu_limit: float = Field(1.0, description="CPU limit") diff --git a/tests/sandbox/test_client.py b/tests/sandbox/test_client.py index a69b894..6b2c61f 100644 --- a/tests/sandbox/test_client.py +++ b/tests/sandbox/test_client.py @@ -30,7 +30,7 @@ def temp_dir() -> Path: async def test_sandbox_creation(local_client: LocalSandboxClient): """Tests sandbox creation with specific configuration.""" config = SandboxSettings( - image="python:3.10-slim", + image="python:3.12-slim", work_dir="/workspace", memory_limit="512m", cpu_limit=0.5, diff --git a/tests/sandbox/test_docker_terminal.py b/tests/sandbox/test_docker_terminal.py index 7903d95..bf0821a 100644 --- a/tests/sandbox/test_docker_terminal.py +++ b/tests/sandbox/test_docker_terminal.py @@ -17,7 +17,7 @@ def docker_client(): async def docker_container(docker_client): """Fixture providing a test Docker container.""" container = docker_client.containers.run( - "python:3.10-slim", + "python:3.12-slim", "tail -f /dev/null", name="test_container", detach=True, diff --git a/tests/sandbox/test_sandbox.py b/tests/sandbox/test_sandbox.py index 3eea366..b21dd6f 100644 --- a/tests/sandbox/test_sandbox.py +++ b/tests/sandbox/test_sandbox.py @@ -8,7 +8,7 @@ from app.sandbox.core.sandbox import DockerSandbox, SandboxSettings def sandbox_config(): """Creates sandbox configuration for testing.""" return SandboxSettings( - image="python:3.10-slim", + image="python:3.12-slim", work_dir="/workspace", memory_limit="1g", cpu_limit=0.5,