mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
Fix Docker installation for swebench and mswebench images (#10124)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -68,12 +68,14 @@ RUN mkdir -p /openhands && \
|
||||
|
||||
|
||||
# ================================================================
|
||||
# Define Docker installation macro
|
||||
{% macro install_docker() %}
|
||||
# Install Docker following official documentation
|
||||
# https://docs.docker.com/engine/install/ubuntu/
|
||||
# https://docs.docker.com/engine/install/debian/
|
||||
RUN \
|
||||
# Determine OS type and install accordingly
|
||||
if [[ "{{ base_image }}" == *"ubuntu"* ]] || [[ "{{ base_image }}" == *"mswebench"* ]]; then \
|
||||
if [[ "{{ base_image }}" == *"ubuntu"* ]]; then \
|
||||
# Handle Ubuntu (following https://docs.docker.com/engine/install/ubuntu/)
|
||||
# Add Docker's official GPG key
|
||||
apt-get update && \
|
||||
@@ -109,6 +111,12 @@ RUN \
|
||||
# Configure Docker daemon with MTU 1450 to prevent packet fragmentation issues
|
||||
RUN mkdir -p /etc/docker && \
|
||||
echo '{"mtu": 1450}' > /etc/docker/daemon.json
|
||||
{% endmacro %}
|
||||
|
||||
# Install Docker only if not a swebench or mswebench image
|
||||
{% if not ('swebench' in base_image) and not ('mswebench' in base_image) %}
|
||||
{{ install_docker() }}
|
||||
{% endif %}
|
||||
# ================================================================
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user