Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ghcr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions containers/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions openhands/runtime/utils/runtime_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}'

Expand Down
16 changes: 6 additions & 10 deletions openhands/runtime/utils/runtime_templates/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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)) -%}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A pattern used a few times in this PR: Avoid trying to determine the right package name from the image name. Using an OR, just try installing one, fallback on the other. If both fail then we fail.

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) -%}
Expand All @@ -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)) %}
Expand Down
22 changes: 11 additions & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ uvicorn = "*"
numpy = "*"
json-repair = "*"
browsergym-core = "0.13.3" # integrate browsergym-core as the browsing interface
playwright = "^1.55.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make explicit instead of transitive through browsergym-core so we get the upgrade can install on Debian Trixie

html2text = "*"
deprecated = "*"
pexpect = "*"
Expand Down
Loading