🙌 OpenHands: AI-Driven Development
Use :main instead of :latest (#2539)
மனோஜ்குமார் பழனிச்சாமி41564c2eac18
diff --git a/evaluation/TUTORIAL.md b/evaluation/TUTORIAL.mdindex db3d856e77..404fcdd7a1 100644--- a/evaluation/TUTORIAL.md+++ b/evaluation/TUTORIAL.md@@ -31,7 +31,6 @@ workspace_base = "/path/to/your/workspace"workspace_mount_path = "/path/to/your/workspace"# ==========================-sandbox_container_image = "ghcr.io/opendevin/sandbox:latest"sandbox_type = "ssh"sandbox_timeout = 120ssh_hostname = "localhost"@@ -179,4 +178,4 @@ model="gpt-4o-2024-05-13"api_key="sk-xxx"```-If `[eval_gpt_4o_2024_05_13]` is not present, it will default to using the model configured in `[llm]`.\ No newline at end of file+If `[eval_gpt_4o_2024_05_13]` is not present, it will default to using the model configured in `[llm]`.diff --git a/evaluation/agent_bench/README.md b/evaluation/agent_bench/README.mdindex 1023c1901e..9c93758808 100644--- a/evaluation/agent_bench/README.md+++ b/evaluation/agent_bench/README.md@@ -18,7 +18,6 @@ cache_dir = "/path/to/cache"workspace_base = "/path/to/workspace"workspace_mount_path = "/path/to/workspace"-sandbox_container_image = "ghcr.io/opendevin/sandbox:latest"sandbox_type = "ssh"sandbox_timeout = 120ssh_hostname = "localhost"diff --git a/evaluation/miniwob/README.md b/evaluation/miniwob/README.mdindex 1d9a6c52e9..2e48de7206 100644--- a/evaluation/miniwob/README.md+++ b/evaluation/miniwob/README.md@@ -16,7 +16,6 @@ Add the following configurations:[core]max_iterations = 100cache_dir = "/tmp/cache"-sandbox_container_image = "ghcr.io/opendevin/sandbox:latest"sandbox_type = "ssh"ssh_hostname = "localhost"sandbox_timeout = 120diff --git a/evaluation/swe_bench/README.md b/evaluation/swe_bench/README.mdindex 41e5d9ecdb..3b49c85198 100644--- a/evaluation/swe_bench/README.md+++ b/evaluation/swe_bench/README.md@@ -42,7 +42,6 @@ Add the following configurations:[core]max_iterations = 100cache_dir = "/tmp/cache"-sandbox_container_image = "ghcr.io/opendevin/sandbox:latest"sandbox_type = "ssh"ssh_hostname = "localhost"sandbox_timeout = 120diff --git a/evaluation/swe_bench/scripts/docker/Dockerfile.builder b/evaluation/swe_bench/scripts/docker/Dockerfile.builderindex 5422ad8880..04eb9fe2d6 100644--- a/evaluation/swe_bench/scripts/docker/Dockerfile.builder+++ b/evaluation/swe_bench/scripts/docker/Dockerfile.builder@@ -1,4 +1,4 @@-FROM ghcr.io/opendevin/sandbox:latest+FROM ghcr.io/opendevin/sandbox:mainRUN apt-get update && \apt-get install -y libffi-dev bash gcc git jq wget pkg-config libfreetype-dev libfreetype6 libfreetype6-dev rsync && \diff --git a/evaluation/webarena/README.md b/evaluation/webarena/README.mdindex ee8b758586..6b6c29d317 100644--- a/evaluation/webarena/README.md+++ b/evaluation/webarena/README.md@@ -16,7 +16,6 @@ Add the following configurations:[core]max_iterations = 100cache_dir = "/tmp/cache"-sandbox_container_image = "ghcr.io/opendevin/sandbox:latest"sandbox_type = "ssh"ssh_hostname = "localhost"sandbox_timeout = 120diff --git a/tests/unit/test_image_agnostic_util.py b/tests/unit/test_image_agnostic_util.pyindex 8daa229747..75e4cead9f 100644--- a/tests/unit/test_image_agnostic_util.py+++ b/tests/unit/test_image_agnostic_util.py@@ -1,42 +1,50 @@from unittest.mock import MagicMock, patch+from opendevin.runtime.docker.image_agnostic_util import (- generate_dockerfile_content,_get_new_image_name,+ generate_dockerfile_content,get_od_sandbox_image,)def test_generate_dockerfile_content():- base_image = "debian:11"+ base_image = 'debian:11'dockerfile_content = generate_dockerfile_content(base_image)assert base_image in dockerfile_content- assert "RUN apt update && apt install -y openssh-server wget sudo" in dockerfile_content+ assert (+ 'RUN apt update && apt install -y openssh-server wget sudo'+ in dockerfile_content+ )def test_get_new_image_name():- base_image = "debian:11"+ base_image = 'debian:11'new_image_name = _get_new_image_name(base_image)- assert new_image_name == "od_sandbox:debian__11"+ assert new_image_name == 'od_sandbox:debian__11'- base_image = "ubuntu:22.04"+ base_image = 'ubuntu:22.04'new_image_name = _get_new_image_name(base_image)- assert new_image_name == "od_sandbox:ubuntu__22.04"+ assert new_image_name == 'od_sandbox:ubuntu__22.04'- base_image = "ubuntu"+ base_image = 'ubuntu'new_image_name = _get_new_image_name(base_image)- assert new_image_name == "od_sandbox:ubuntu__latest"+ assert new_image_name == 'od_sandbox:ubuntu__latest'-@patch("opendevin.runtime.docker.image_agnostic_util._build_sandbox_image")-@patch("opendevin.runtime.docker.image_agnostic_util.docker.DockerClient")+@patch('opendevin.runtime.docker.image_agnostic_util._build_sandbox_image')+@patch('opendevin.runtime.docker.image_agnostic_util.docker.DockerClient')def test_get_od_sandbox_image(mock_docker_client, mock_build_sandbox_image):- base_image = "debian:11"- mock_docker_client.images.list.return_value = [MagicMock(tags=["od_sandbox:debian__11"])]+ base_image = 'debian:11'+ mock_docker_client.images.list.return_value = [+ MagicMock(tags=['od_sandbox:debian__11'])+ ]image_name = get_od_sandbox_image(base_image, mock_docker_client)- assert image_name == "od_sandbox:debian__11"+ assert image_name == 'od_sandbox:debian__11'mock_docker_client.images.list.return_value = []image_name = get_od_sandbox_image(base_image, mock_docker_client)- assert image_name == "od_sandbox:debian__11"- mock_build_sandbox_image.assert_called_once_with(base_image, "od_sandbox:debian__11", mock_docker_client)+ assert image_name == 'od_sandbox:debian__11'+ mock_build_sandbox_image.assert_called_once_with(+ base_image, 'od_sandbox:debian__11', mock_docker_client+ )