π OpenHands: AI-Driven Development
Fix libgl1 package for mswebench base images (#9071)
juanmichelinifb5a39a150fb
diff --git a/openhands/runtime/utils/runtime_templates/Dockerfile.j2 b/openhands/runtime/utils/runtime_templates/Dockerfile.j2index 433dd315b1..8b86016516 100644--- a/openhands/runtime/utils/runtime_templates/Dockerfile.j2+++ b/openhands/runtime/utils/runtime_templates/Dockerfile.j2@@ -14,11 +14,11 @@ ENV POETRY_VIRTUALENVS_PATH=/openhands/poetry \# Install base system dependencies-{% if 'ubuntu' in base_image %}+{% if (('ubuntu' in base_image) or ('mswebench' in base_image)) %}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 \- {%- if (base_image.endswith(':latest') or base_image.endswith(':24.04')) -%}+ {%- if (base_image.endswith(':latest') or base_image.endswith(':24.04') or ('mswebench' in base_image)) -%}libgl1 \{%- else %}libgl1-mesa-glx \@@ -26,12 +26,16 @@ RUN apt-get update && \libasound2-plugins libatomic1 && \curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \TZ=Etc/UTC DEBIAN_FRONTEND=noninteractive \+ {%- if ('mswebench' in base_image) -%}+ apt-get install -y --no-install-recommends nodejs python3 python-is-python3 python3-pip python3-venv && \+ {%- else %}apt-get install -y --no-install-recommends nodejs python3.12 python-is-python3 python3-pip python3.12-venv && \+ {% endif -%}apt-get clean && \rm -rf /var/lib/apt/lists/*{% endif %}-{% if 'ubuntu' not in base_image %}+{% if (('ubuntu' not in base_image) and ('mswebench' not in base_image)) %}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 \@@ -41,7 +45,7 @@ RUN apt-get update && \rm -rf /var/lib/apt/lists/*{% endif %}-{% if 'ubuntu' in base_image %}+{% if (('ubuntu' in base_image) or ('mswebench' in base_image)) %}RUN ln -s "$(dirname $(which node))/corepack" /usr/local/bin/corepack && \npm install -g corepack && corepack enable yarn && \curl -fsSL --compressed https://install.python-poetry.org | python -