Fix libgl1 package for mswebench base images (#9071)

This commit is contained in:
juanmichelini 2025-07-11 17:30:33 +02:00 committed by GitHub
parent fc11c15b75
commit fb5a39a150
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 -