diff --git a/.github/workflows/ghcr-build.yml b/.github/workflows/ghcr-build.yml index 82bf9ff6b32e..14e953390338 100644 --- a/.github/workflows/ghcr-build.yml +++ b/.github/workflows/ghcr-build.yml @@ -46,6 +46,7 @@ jobs: else json=$(jq -n -c '[ { image: "nikolaik/python-nodejs:python3.12-nodejs22", tag: "nikolaik" }, + { image: "ghcr.io/all-hands-ai/python-nodejs:python3.13-nodejs22-trixie", tag: "trixie" }, { image: "ubuntu:24.04", tag: "ubuntu" } ]') fi @@ -136,6 +137,7 @@ jobs: if: github.event.pull_request.head.repo.fork != true shell: bash run: | + ./containers/build.sh -i runtime -o ${{ env.REPO_OWNER }} -t ${{ matrix.base_image.tag }} --dry DOCKER_BUILD_JSON=$(jq -c . < docker-build-dry.json) diff --git a/containers/app/Dockerfile b/containers/app/Dockerfile index 87f9adfcd3e4..372e5b1ef691 100644 --- a/containers/app/Dockerfile +++ b/containers/app/Dockerfile @@ -1,5 +1,5 @@ ARG OPENHANDS_BUILD_VERSION=dev -FROM node:24.3.0-bookworm-slim AS frontend-builder +FROM node:24.8-trixie-slim AS frontend-builder WORKDIR /app @@ -9,7 +9,7 @@ RUN npm ci COPY frontend ./ RUN npm run build -FROM python:3.12.10-slim AS base +FROM python:3.13.7-slim-trixie AS base FROM base AS backend-builder WORKDIR /app diff --git a/openhands/runtime/utils/runtime_build.py b/openhands/runtime/utils/runtime_build.py index ada1a148af8f..37f59487dbac 100644 --- a/openhands/runtime/utils/runtime_build.py +++ b/openhands/runtime/utils/runtime_build.py @@ -89,9 +89,9 @@ def get_runtime_image_repo_and_tag(base_image: str) -> tuple[str, str]: # Hash the repo if it's too long if len(repo) > 32: repo_hash = hashlib.md5(repo[:-24].encode()).hexdigest()[:8] + repo = f'{repo_hash}_{repo[-24:]}' # Use 8 char hash + last 24 chars - else: - repo = repo.replace('/', '_s_') + repo = repo.replace('/', '_s_') new_tag = f'oh_v{oh_version}_image_{repo}_tag_{tag}' diff --git a/openhands/runtime/utils/runtime_templates/Dockerfile.j2 b/openhands/runtime/utils/runtime_templates/Dockerfile.j2 index 896f55b30a02..51c0de535f3c 100644 --- a/openhands/runtime/utils/runtime_templates/Dockerfile.j2 +++ b/openhands/runtime/utils/runtime_templates/Dockerfile.j2 @@ -24,14 +24,10 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ wget curl ca-certificates sudo apt-utils git jq tmux build-essential ripgrep ffmpeg \ coreutils util-linux procps findutils grep sed \ - {%- if (base_image.endswith(':latest') or base_image.endswith(':24.04') or ('mswebench' in base_image)) -%} - libgl1 \ - {%- else %} - libgl1-mesa-glx \ - {% endif -%} - libasound2-plugins libatomic1 \ + libasound2-plugins libatomic1 && \ + (apt-get install -y --no-install-recommends libgl1 || apt-get install -y --no-install-recommends libgl1-mesa-glx) && \ # Install Docker dependencies - apt-transport-https ca-certificates curl gnupg lsb-release && \ + apt-get install -y --no-install-recommends apt-transport-https ca-certificates curl gnupg lsb-release && \ curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \ TZ=Etc/UTC DEBIAN_FRONTEND=noninteractive \ {%- if ('mswebench' in base_image) -%} @@ -46,10 +42,10 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ wget curl ca-certificates sudo apt-utils git jq tmux build-essential ripgrep ffmpeg \ coreutils util-linux procps findutils grep sed \ - libgl1-mesa-glx \ - libasound2-plugins libatomic1 \ + libasound2-plugins libatomic1 && \ + (apt-get install -y --no-install-recommends libgl1 || apt-get install -y --no-install-recommends libgl1-mesa-glx) && \ # Install Docker dependencies - apt-transport-https ca-certificates curl gnupg lsb-release + apt-get install -y --no-install-recommends apt-transport-https ca-certificates curl gnupg lsb-release {% endif %} {% if (('ubuntu' in base_image) or ('mswebench' in base_image)) %} diff --git a/poetry.lock b/poetry.lock index 33880f0fbdff..ebea4dd14867 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.2.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. [[package]] name = "aiofiles" @@ -7078,20 +7078,20 @@ type = ["mypy (>=1.14.1)"] [[package]] name = "playwright" -version = "1.52.0" +version = "1.55.0" description = "A high-level API to automate web browsers" optional = false python-versions = ">=3.9" groups = ["main", "evaluation", "test"] files = [ - {file = "playwright-1.52.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:19b2cb9d4794062008a635a99bd135b03ebb782d460f96534a91cb583f549512"}, - {file = "playwright-1.52.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:0797c0479cbdc99607412a3c486a3a2ec9ddc77ac461259fd2878c975bcbb94a"}, - {file = "playwright-1.52.0-py3-none-macosx_11_0_universal2.whl", hash = "sha256:7223960b7dd7ddeec1ba378c302d1d09733b8dac438f492e9854c85d3ca7144f"}, - {file = "playwright-1.52.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:d010124d24a321e0489a8c0d38a3971a7ca7656becea7656c9376bfea7f916d4"}, - {file = "playwright-1.52.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4173e453c43180acc60fd77ffe1ebee8d0efbfd9986c03267007b9c3845415af"}, - {file = "playwright-1.52.0-py3-none-win32.whl", hash = "sha256:cd0bdf92df99db6237a99f828e80a6a50db6180ef8d5352fc9495df2c92f9971"}, - {file = "playwright-1.52.0-py3-none-win_amd64.whl", hash = "sha256:dcbf75101eba3066b7521c6519de58721ea44379eb17a0dafa94f9f1b17f59e4"}, - {file = "playwright-1.52.0-py3-none-win_arm64.whl", hash = "sha256:9d0085b8de513de5fb50669f8e6677f0252ef95a9a1d2d23ccee9638e71e65cb"}, + {file = "playwright-1.55.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:d7da108a95001e412effca4f7610de79da1637ccdf670b1ae3fdc08b9694c034"}, + {file = "playwright-1.55.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:8290cf27a5d542e2682ac274da423941f879d07b001f6575a5a3a257b1d4ba1c"}, + {file = "playwright-1.55.0-py3-none-macosx_11_0_universal2.whl", hash = "sha256:25b0d6b3fd991c315cca33c802cf617d52980108ab8431e3e1d37b5de755c10e"}, + {file = "playwright-1.55.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:c6d4d8f6f8c66c483b0835569c7f0caa03230820af8e500c181c93509c92d831"}, + {file = "playwright-1.55.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29a0777c4ce1273acf90c87e4ae2fe0130182100d99bcd2ae5bf486093044838"}, + {file = "playwright-1.55.0-py3-none-win32.whl", hash = "sha256:29e6d1558ad9d5b5c19cbec0a72f6a2e35e6353cd9f262e22148685b86759f90"}, + {file = "playwright-1.55.0-py3-none-win_amd64.whl", hash = "sha256:7eb5956473ca1951abb51537e6a0da55257bb2e25fc37c2b75af094a5c93736c"}, + {file = "playwright-1.55.0-py3-none-win_arm64.whl", hash = "sha256:012dc89ccdcbd774cdde8aeee14c08e0dd52ddb9135bf10e9db040527386bd76"}, ] [package.dependencies] @@ -11887,4 +11887,4 @@ third-party-runtimes = ["daytona", "e2b-code-interpreter", "modal", "runloop-api [metadata] lock-version = "2.1" python-versions = "^3.12,<3.14" -content-hash = "6f1c757233a5d2df1b17f11787b8ad29da98c12a28a07644bffb6fddf4618798" +content-hash = "566b34b25e55ede53da7dd3917e9039a33930d55bfaf24aa84bb56819596604b" diff --git a/pyproject.toml b/pyproject.toml index eb1177c5efe7..f7f0eefb956a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ uvicorn = "*" numpy = "*" json-repair = "*" browsergym-core = "0.13.3" # integrate browsergym-core as the browsing interface +playwright = "^1.55.0" html2text = "*" deprecated = "*" pexpect = "*"