Skip to content

Commit

Permalink
Release 3.0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
john-b-yang committed Feb 19, 2025
1 parent 645228e commit beec8d1
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion swebench/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.0.10"
__version__ = "3.0.11"

from swebench.collect.build_dataset import main as build_dataset
from swebench.collect.get_tasks_pipeline import main as get_tasks_pipeline
Expand Down
4 changes: 3 additions & 1 deletion swebench/harness/constants/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ def __str__(self):
]
SWE_BENCH_URL_RAW = "https://raw.githubusercontent.com/"
DEFAULT_DOCKER_SPECS = {
"pnpm_version": "9.5.0",
"conda_version": "py311_23.11.0-2",
"node_version": "21.6.2",
"pnpm_version": "9.5.0",
"python_version": "3.9",
"ubuntu_version": "22.04",
}
FAIL_ONLY_REPOS = {
"chartjs/Chart.js",
Expand Down
14 changes: 7 additions & 7 deletions swebench/harness/dockerfiles/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@
"js": _DOCKERFILE_INSTANCE_JS,
}

_DEFAULT_VERSIONS = {
"conda_version": "py311_23.11.0-2",
"ubuntu_version": "22.04",
}


def get_dockerfile_base(platform, arch, language, **kwargs):
if arch == "arm64":
conda_arch = "aarch64"
else:
conda_arch = arch
return _DOCKERFILE_BASE[language].format(
platform=platform, conda_arch=conda_arch, **{**_DEFAULT_VERSIONS, **kwargs}
platform=platform, conda_arch=conda_arch, **kwargs
)


def get_dockerfile_env(platform, arch, language, **kwargs):
return _DOCKERFILE_ENV[language].format(platform=platform, arch=arch, **kwargs)
return _DOCKERFILE_ENV[language].format(
platform=platform,
arch=arch,
base_image_name=f"sweb.base.{language}.{arch}:latest",
**kwargs,
)


def get_dockerfile_instance(platform, language, env_image_name):
Expand Down
2 changes: 1 addition & 1 deletion swebench/harness/dockerfiles/javascript.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
USER root
"""

_DOCKERFILE_ENV_JS = r"""FROM --platform={platform} sweb.base.js.{arch}:latest
_DOCKERFILE_ENV_JS = r"""FROM --platform={platform} {base_image_name}
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
Expand Down
2 changes: 1 addition & 1 deletion swebench/harness/dockerfiles/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
RUN adduser --disabled-password --gecos 'dog' nonroot
"""

_DOCKERFILE_ENV_PY = r"""FROM --platform={platform} sweb.base.py.{arch}:latest
_DOCKERFILE_ENV_PY = r"""FROM --platform={platform} {base_image_name}
COPY ./setup_env.sh /root/
RUN sed -i -e 's/\r$//' /root/setup_env.sh
Expand Down
7 changes: 6 additions & 1 deletion swebench/harness/test_spec/test_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ def get_instance_container_name(self, run_id=None):

@property
def base_dockerfile(self):
return get_dockerfile_base(self.platform, self.arch, self.language)
return get_dockerfile_base(
self.platform,
self.arch,
self.language,
**{**DEFAULT_DOCKER_SPECS, **self.docker_specs},
)

@property
def env_dockerfile(self):
Expand Down

0 comments on commit beec8d1

Please sign in to comment.