Bump pytohn version

This commit is contained in:
Tim O'Farrell
2024-08-22 13:52:51 -06:00
parent ed83926fc8
commit 2e48be1622
57 changed files with 98 additions and 98 deletions

View File

@@ -2,7 +2,7 @@
sudo apt update
sudo apt install -y netcat
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt install -y python3.11
curl -sSL https://install.python-poetry.org | python3.11 -
# chromadb requires SQLite > 3.35 but SQLite in Python3.11.9 comes with 3.31.1
sudo apt install -y python3.12
curl -sSL https://install.python-poetry.org | python3.12 -
# chromadb requires SQLite > 3.35 but SQLite in Python3.12.9 comes with 3.31.1
sudo cp /opt/conda/lib/libsqlite3.so.0 /lib/x86_64-linux-gnu/libsqlite3.so.0

View File

@@ -32,7 +32,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- name: Generate Python Docs
run: rm -rf docs/modules/python && pip install pydoc-markdown && pydoc-markdown
- name: Install dependencies

View File

@@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- name: Set up environment
run: |
curl -sSL https://install.python-poetry.org | python3 -

View File

@@ -32,7 +32,7 @@ jobs:
strategy:
matrix:
image: ['runtime']
base_image: ['nikolaik/python-nodejs:python3.11-nodejs22', 'python:3.11-bookworm', 'node:22-bookworm']
base_image: ['nikolaik/python-nodejs:python3.12-nodejs22', 'python:3.12-bookworm', 'node:22-bookworm']
platform: ['amd64', 'arm64']
outputs:
tags: ${{ steps.capture-tags.outputs.tags }}
@@ -63,7 +63,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: 'poetry'
- name: Install Python dependencies using Poetry
run: make install-python-dependencies
@@ -159,7 +159,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: 'poetry'
- name: Install Python dependencies using Poetry
run: make install-python-dependencies
@@ -216,7 +216,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: 'poetry'
- name: Install Python dependencies using Poetry
run: make install-python-dependencies

View File

@@ -41,7 +41,7 @@ jobs:
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.12
cache: 'pip'
- name: Install pre-commit
run: pip install pre-commit==3.7.0

View File

@@ -19,7 +19,7 @@ jobs:
INSTALL_DOCKER: '1' # Set to '0' to skip Docker installation
strategy:
matrix:
python-version: ['3.11']
python-version: ['3.12']
steps:
- uses: actions/checkout@v4
- name: Install poetry via pipx
@@ -96,7 +96,7 @@ jobs:
INSTALL_DOCKER: '0' # Set to '0' to skip Docker installation
strategy:
matrix:
python-version: ['3.11']
python-version: ['3.12']
steps:
- uses: actions/checkout@v4
- name: Install poetry via pipx

View File

@@ -18,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
- name: install git, github cli
run: |
sudo apt-get install -y git gh

View File

@@ -7,7 +7,7 @@ Otherwise, you can clone the OpenHands project directly.
### 1. Requirements
* Linux, Mac OS, or [WSL on Windows](https://learn.microsoft.com/en-us/windows/wsl/install) [ Ubuntu <= 22.04]
* [Docker](https://docs.docker.com/engine/install/) (For those on MacOS, make sure to allow the default Docker socket to be used from advanced settings!)
* [Python](https://www.python.org/downloads/) = 3.11
* [Python](https://www.python.org/downloads/) = 3.12
* [NodeJS](https://nodejs.org/en/download/package-manager) >= 18.17.1
* [Poetry](https://python-poetry.org/docs/#installing-with-the-official-installer) >= 1.8
* netcat => sudo apt-get install netcat
@@ -22,8 +22,8 @@ If you want to develop without system admin/sudo access to upgrade/install `Pyth
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh
# Install Python 3.11, nodejs, and poetry
mamba install python=3.11
# Install Python 3.12, nodejs, and poetry
mamba install python=3.12
mamba install conda-forge::nodejs
mamba install conda-forge::poetry
```

View File

@@ -174,7 +174,7 @@ llm_config = 'gpt3'
#user_id = 1000
# Container image to use for the sandbox
#container_image = "nikolaik/python-nodejs:python3.11-nodejs22"
#container_image = "nikolaik/python-nodejs:python3.12-nodejs22"
# Use host network
#use_host_network = false

View File

@@ -3503,8 +3503,8 @@
}
},
"node_modules/@types/node-forge": {
"version": "1.3.11",
"resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz",
"version": "1.3.12",
"resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.12.tgz",
"integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==",
"dependencies": {
"@types/node": "*"
@@ -15265,8 +15265,8 @@
"integrity": "sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA=="
},
"node_modules/utility-types": {
"version": "3.11.0",
"resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.11.0.tgz",
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.12.0.tgz",
"integrity": "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==",
"engines": {
"node": ">= 4"

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 113 KiB

View File

@@ -62,7 +62,7 @@ def get_config(
runtime='eventstream',
max_iterations=metadata.max_iterations,
sandbox=SandboxConfig(
container_image='python:3.11-bookworm',
container_image='python:3.12-bookworm',
enable_auto_lint=False,
use_host_network=False,
),

View File

@@ -44,7 +44,7 @@ def get_config(
runtime='eventstream',
max_iterations=metadata.max_iterations,
sandbox=SandboxConfig(
container_image='python:3.11-bookworm',
container_image='python:3.12-bookworm',
enable_auto_lint=True,
use_host_network=False,
),

View File

@@ -42,7 +42,7 @@ def get_config(
runtime='eventstream',
max_iterations=metadata.max_iterations,
sandbox=SandboxConfig(
container_image='python:3.11-bookworm',
container_image='python:3.12-bookworm',
enable_auto_lint=True,
use_host_network=False,
timeout=100,

View File

@@ -75,7 +75,7 @@ def get_config(
runtime='eventstream',
max_iterations=metadata.max_iterations,
sandbox=SandboxConfig(
container_image='python:3.11-bookworm',
container_image='python:3.12-bookworm',
enable_auto_lint=True,
use_host_network=False,
),

View File

@@ -40,7 +40,7 @@ def get_config(
runtime='eventstream',
max_iterations=metadata.max_iterations,
sandbox=SandboxConfig(
container_image='python:3.11-bookworm',
container_image='python:3.12-bookworm',
enable_auto_lint=False,
use_host_network=False,
),

View File

@@ -51,7 +51,7 @@ def get_config(
runtime='eventstream',
max_iterations=metadata.max_iterations,
sandbox=SandboxConfig(
container_image='python:3.11-bookworm',
container_image='python:3.12-bookworm',
enable_auto_lint=True,
use_host_network=False,
),

View File

@@ -43,7 +43,7 @@ def get_config(
runtime='eventstream',
max_iterations=metadata.max_iterations,
sandbox=SandboxConfig(
container_image='python:3.11-bookworm',
container_image='python:3.12-bookworm',
enable_auto_lint=True,
use_host_network=False,
),

View File

@@ -65,7 +65,7 @@ def get_config(
runtime='eventstream',
max_iterations=metadata.max_iterations,
sandbox=SandboxConfig(
container_image='python:3.11-bookworm',
container_image='python:3.12-bookworm',
enable_auto_lint=True,
use_host_network=False,
),

View File

@@ -86,7 +86,7 @@ def get_config(
runtime='eventstream',
max_iterations=metadata.max_iterations,
sandbox=SandboxConfig(
container_image='python:3.11-bookworm',
container_image='python:3.12-bookworm',
enable_auto_lint=True,
use_host_network=False,
),

View File

@@ -1,4 +1,4 @@
FROM python:3.11-bookworm
FROM python:3.12-bookworm
RUN pip install scitools-pyke

View File

@@ -1,4 +1,4 @@
FROM python:3.11-bookworm
FROM python:3.12-bookworm
RUN apt-get update && apt-get install -y python3 python3-pip git

View File

@@ -1,4 +1,4 @@
FROM python:3.11-bookworm
FROM python:3.12-bookworm
RUN apt-get update && apt-get install -y python3 python3-pip git gcc

View File

@@ -1,4 +1,4 @@
FROM python:3.11-bookworm
FROM python:3.12-bookworm
RUN apt-get update && apt-get install -y python3 python3-pip

View File

@@ -45,7 +45,7 @@ def get_config(
runtime='eventstream',
max_iterations=metadata.max_iterations,
sandbox=SandboxConfig(
container_image='python:3.11-bookworm',
container_image='python:3.12-bookworm',
enable_auto_lint=True,
use_host_network=False,
),

View File

@@ -54,7 +54,7 @@ def get_config(
runtime='eventstream',
max_iterations=metadata.max_iterations,
sandbox=SandboxConfig(
container_image='python:3.11-bookworm',
container_image='python:3.12-bookworm',
enable_auto_lint=True,
use_host_network=False,
browsergym_eval_env=env_id,

View File

@@ -199,7 +199,7 @@ class SandboxConfig(metaclass=Singleton):
"""
api_hostname: str = 'localhost'
container_image: str = 'nikolaik/python-nodejs:python3.11-nodejs22' # default to nikolaik/python-nodejs:python3.11-nodejs22 for eventstream runtime
container_image: str = 'nikolaik/python-nodejs:python3.12-nodejs22' # default to nikolaik/python-nodejs:python3.12-nodejs22 for eventstream runtime
user_id: int = os.getuid() if hasattr(os, 'getuid') else 1000
timeout: int = 120
enable_auto_lint: bool = (

View File

@@ -371,7 +371,7 @@ def _build_sandbox_image(
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument(
'--base_image', type=str, default='nikolaik/python-nodejs:python3.11-nodejs22'
'--base_image', type=str, default='nikolaik/python-nodejs:python3.12-nodejs22'
)
parser.add_argument('--build_folder', type=str, default=None)
parser.add_argument('--force_rebuild', action='store_true', default=False)

View File

@@ -34,7 +34,7 @@ RUN if [ ! -d /openhands/miniforge3 ]; then \
fi
# Install Python and Poetry
RUN /openhands/miniforge3/bin/mamba install conda-forge::poetry python=3.11 -y
RUN /openhands/miniforge3/bin/mamba install conda-forge::poetry python=3.12 -y
# ================================================================
# END: Build Runtime Image from Scratch
# ================================================================
@@ -51,7 +51,7 @@ COPY ./code /openhands/code
# 2. Install playwright and chromium
# 3. Clear poetry, apt, mamba caches
RUN cd /openhands/code && \
/openhands/miniforge3/bin/mamba run -n base poetry env use python3.11 && \
/openhands/miniforge3/bin/mamba run -n base poetry env use python3.12 && \
/openhands/miniforge3/bin/mamba run -n base poetry install --only main,runtime --no-interaction --no-root && \
apt-get update && \
/openhands/miniforge3/bin/mamba run -n base poetry run pip install playwright && \

View File

@@ -9,7 +9,7 @@ repository = "https://github.com/All-Hands-AI/OpenHands"
include = ["poetry.lock"]
[tool.poetry.dependencies]
python = "^3.11"
python = "^3.12"
datasets = "*"
pandas = "*"
litellm = "*"

View File

@@ -411,6 +411,6 @@ with open('/workspace/test.txt', 'w') as file:
OBSERVATION:
[Code executed successfully with no output]
[Jupyter current working directory: /workspace]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
ENVIRONMENT REMINDER: You have 13 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -425,6 +425,6 @@ Successfully installed pymsgbox-1.0.9
[notice] To update, run: pip install --upgrade pip
Note: you may need to restart the kernel to use updated packages.
[Jupyter current working directory: /workspace]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
ENVIRONMENT REMINDER: You have 13 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -425,7 +425,7 @@ Successfully installed pymsgbox-1.0.9
[notice] To update, run: pip install --upgrade pip
Note: you may need to restart the kernel to use updated packages.
[Jupyter current working directory: /workspace]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
----------
@@ -444,6 +444,6 @@ with open('/workspace/test.txt', 'w') as file:
OBSERVATION:
[Code executed successfully with no output]
[Jupyter current working directory: /workspace]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
ENVIRONMENT REMINDER: You have 12 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -425,7 +425,7 @@ Successfully installed pymsgbox-1.0.9
[notice] To update, run: pip install --upgrade pip
Note: you may need to restart the kernel to use updated packages.
[Jupyter current working directory: /workspace]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
----------
@@ -444,7 +444,7 @@ with open('/workspace/test.txt', 'w') as file:
OBSERVATION:
[Code executed successfully with no output]
[Jupyter current working directory: /workspace]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
----------
@@ -458,7 +458,7 @@ cat /workspace/test.txt
OBSERVATION:
pymsgbox version: 1.0.9
[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
openhands@docker-desktop:/workspace $
[Command -1 finished with exit code 0]

View File

@@ -604,6 +604,6 @@ with open('/workspace/test.txt', 'w') as file:
OBSERVATION:
[Code executed successfully with no output]
[Jupyter current working directory: /workspace]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
ENVIRONMENT REMINDER: You have 13 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -618,6 +618,6 @@ Successfully installed pymsgbox-1.0.9
[notice] To update, run: pip install --upgrade pip
Note: you may need to restart the kernel to use updated packages.
[Jupyter current working directory: /workspace]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
ENVIRONMENT REMINDER: You have 13 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -618,7 +618,7 @@ Successfully installed pymsgbox-1.0.9
[notice] To update, run: pip install --upgrade pip
Note: you may need to restart the kernel to use updated packages.
[Jupyter current working directory: /workspace]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
----------
@@ -639,6 +639,6 @@ version_info
OBSERVATION:
'1.0.9'
[Jupyter current working directory: /workspace]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
ENVIRONMENT REMINDER: You have 12 turns left to complete the task. When finished reply with <finish></finish>.

View File

@@ -618,7 +618,7 @@ Successfully installed pymsgbox-1.0.9
[notice] To update, run: pip install --upgrade pip
Note: you may need to restart the kernel to use updated packages.
[Jupyter current working directory: /workspace]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
----------
@@ -639,7 +639,7 @@ version_info
OBSERVATION:
'1.0.9'
[Jupyter current working directory: /workspace]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
----------
@@ -653,7 +653,7 @@ cat /workspace/test.txt
OBSERVATION:
pymsgbox version: 1.0.9
[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
openhands@docker-desktop:/workspace $
[Command -1 finished with exit code 0]

View File

@@ -41,7 +41,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[{"source": "agent", "action": "run", "args": {"command": "ls", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "bad.txt\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "ls", "exit_code": 0}}]
[{"source": "agent", "action": "run", "args": {"command": "ls", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "bad.txt\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "ls", "exit_code": 0}}]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:

View File

@@ -41,7 +41,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[{"source": "agent", "action": "run", "args": {"command": "ls", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "bad.txt\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "ls", "exit_code": 0}}, {"source": "agent", "action": "read", "args": {"path": "bad.txt", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n", "extras": {"path": "/workspace/bad.txt"}}]
[{"source": "agent", "action": "run", "args": {"command": "ls", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "bad.txt\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "ls", "exit_code": 0}}, {"source": "agent", "action": "read", "args": {"path": "bad.txt", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n", "extras": {"path": "/workspace/bad.txt"}}]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:

View File

@@ -41,7 +41,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[{"source": "agent", "action": "run", "args": {"command": "ls", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "ls", "exit_code": 0}}]
[{"source": "agent", "action": "run", "args": {"command": "ls", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "ls", "exit_code": 0}}]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:

View File

@@ -41,7 +41,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[{"source": "agent", "action": "write", "args": {"path": "hello.sh", "content": "#!/bin/bash\n\necho 'hello'", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "write", "content": "", "extras": {"path": "/workspace/hello.sh"}}, {"source": "agent", "action": "run", "args": {"command": "chmod +x hello.sh", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "chmod +x hello.sh", "exit_code": 0}}]
[{"source": "agent", "action": "write", "args": {"path": "hello.sh", "content": "#!/bin/bash\n\necho 'hello'", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "write", "content": "", "extras": {"path": "/workspace/hello.sh"}}, {"source": "agent", "action": "run", "args": {"command": "chmod +x hello.sh", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "chmod +x hello.sh", "exit_code": 0}}]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:

View File

@@ -41,7 +41,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[{"source": "agent", "action": "write", "args": {"path": "hello.sh", "content": "#!/bin/bash\n\necho 'hello'", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "write", "content": "", "extras": {"path": "/workspace/hello.sh"}}, {"source": "agent", "action": "run", "args": {"command": "chmod +x hello.sh", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "chmod +x hello.sh", "exit_code": 0}}, {"source": "agent", "action": "run", "args": {"command": "./hello.sh", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "hello\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "./hello.sh", "exit_code": 0}}]
[{"source": "agent", "action": "write", "args": {"path": "hello.sh", "content": "#!/bin/bash\n\necho 'hello'", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "write", "content": "", "extras": {"path": "/workspace/hello.sh"}}, {"source": "agent", "action": "run", "args": {"command": "chmod +x hello.sh", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "chmod +x hello.sh", "exit_code": 0}}, {"source": "agent", "action": "run", "args": {"command": "./hello.sh", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "hello\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "./hello.sh", "exit_code": 0}}]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:

View File

@@ -39,7 +39,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[{"source": "agent", "action": "read", "args": {"path": "hello.sh", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "#!/bin/bash\n\necho 'hello'\n", "extras": {"path": "/workspace/hello.sh"}}, {"source": "agent", "action": "run", "args": {"command": "bash hello.sh", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "hello\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "bash hello.sh", "exit_code": 0}}]
[{"source": "agent", "action": "read", "args": {"path": "hello.sh", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "#!/bin/bash\n\necho 'hello'\n", "extras": {"path": "/workspace/hello.sh"}}, {"source": "agent", "action": "run", "args": {"command": "bash hello.sh", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "hello\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "bash hello.sh", "exit_code": 0}}]
## Format
Your response MUST be in JSON format. It must be an object, and it must contain two fields:

View File

@@ -28,7 +28,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}]
[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}]
If the last item in the history is an error, you should try to fix it.

View File

@@ -28,7 +28,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}]
[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}]
If the last item in the history is an error, you should try to fix it.

View File

@@ -28,7 +28,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}]
[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}]
If the last item in the history is an error, you should try to fix it.

View File

@@ -28,7 +28,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}]
[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}]
If the last item in the history is an error, you should try to fix it.

View File

@@ -28,7 +28,7 @@ as well as observations you've made. This only includes the MOST RECENT
actions and observations--more may have happened before that.
They are time-ordered, with your most recent action at the bottom.
[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}]
[{"source": "agent", "action": "run", "args": {"command": "git status", "thought": "", "keep_prompt": true, "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "fatal: not a git repository (or any parent up to mount point /)\r\nStopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ", "extras": {"command_id": -1, "command": "git status", "exit_code": 128}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}, {"source": "agent", "observation": "error", "content": "action={'action': 'reject', 'args': {'reason': 'Not a valid git repository.'}} has the wrong arguments", "extras": {}}]
If the last item in the history is an error, you should try to fix it.

View File

@@ -205,7 +205,7 @@ ten actions--more happened before that.
{
"source": "agent",
"observation": "run",
"content": "hello\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ",
"content": "hello\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ",
"extras": {
"command_id": -1,
"command": "bash hello.sh",

View File

@@ -204,7 +204,7 @@ ten actions--more happened before that.
{
"source": "agent",
"observation": "run",
"content": "hello\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]\nopenhands@docker-desktop:/workspace $ ",
"content": "hello\r\n\r\n[Python Interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]\nopenhands@docker-desktop:/workspace $ ",
"extras": {
"command_id": -1,
"command": "bash hello.sh",

View File

@@ -58,7 +58,7 @@ mkdir -p $WORKSPACE_BASE
# use environmental variable if exists
TEST_RUNTIME="${TEST_RUNTIME:-eventstream}"
if [ -z "$SANDBOX_CONTAINER_IMAGE" ]; then
SANDBOX_CONTAINER_IMAGE="nikolaik/python-nodejs:python3.11-nodejs22"
SANDBOX_CONTAINER_IMAGE="nikolaik/python-nodejs:python3.12-nodejs22"
fi
MAX_ITERATIONS=15

View File

@@ -73,8 +73,8 @@ def container_image(request):
request.param = request.config.getoption('--container-image')
if request.param is None:
request.param = pytest.param(
'nikolaik/python-nodejs:python3.11-nodejs22',
'python:3.11-bookworm',
'nikolaik/python-nodejs:python3.12-nodejs22',
'python:3.12-bookworm',
'node:22-bookworm',
'golang:1.23-bookworm',
)

View File

@@ -17,8 +17,8 @@ from openhands.events.action import CmdRunAction
async def test_bash_python_version(temp_dir, box_class, container_image):
"""Make sure Python is available in bash."""
if container_image not in [
'python:3.11-bookworm',
'nikolaik/python-nodejs:python3.11-nodejs22',
'python:3.12-bookworm',
'nikolaik/python-nodejs:python3.12-nodejs22',
]:
pytest.skip('This test is only for python-related images')
@@ -35,7 +35,7 @@ async def test_bash_python_version(temp_dir, box_class, container_image):
obs = await runtime.run_action(action)
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
assert obs.exit_code == 0
assert 'Python 3.11' in obs.content # Check for specific version
assert 'Python 3.12' in obs.content # Check for specific version
action = CmdRunAction(command='pip --version')
logger.info(action, extra={'msg_type': 'ACTION'})
@@ -53,7 +53,7 @@ async def test_nodejs_22_version(temp_dir, box_class, container_image):
"""Make sure Node.js is available in bash."""
if container_image not in [
'node:22-bookworm',
'nikolaik/python-nodejs:python3.11-nodejs22',
'nikolaik/python-nodejs:python3.12-nodejs22',
]:
pytest.skip('This test is only for nodejs-related images')

View File

@@ -51,7 +51,7 @@ async def test_simple_cmd_ipython_and_fileop(temp_dir, box_class, run_as_openhan
assert obs.content.strip() == (
'Hello, `World`!\n'
'[Jupyter current working directory: /workspace]\n'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]'
)
# Test read file (file should not exist)
@@ -126,7 +126,7 @@ async def test_ipython_multi_user(temp_dir, box_class, run_as_openhands):
== (
'/workspace\n'
'[Jupyter current working directory: /workspace]\n'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]'
).strip()
)
@@ -142,7 +142,7 @@ async def test_ipython_multi_user(temp_dir, box_class, run_as_openhands):
== (
'[Code executed successfully with no output]\n'
'[Jupyter current working directory: /workspace]\n'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]'
).strip()
)
@@ -188,7 +188,7 @@ async def test_ipython_simple(temp_dir, box_class):
== (
'1\n'
'[Jupyter current working directory: /workspace]\n'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]'
).strip()
)
@@ -225,7 +225,7 @@ async def _test_ipython_agentskills_fileop_pwd_impl(
'(this is the end of the file)\n'
'[File hello.py created.]\n'
'[Jupyter current working directory: /workspace]\n'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]'
).strip().split('\n')
action = CmdRunAction(command='cd test')
@@ -249,7 +249,7 @@ async def _test_ipython_agentskills_fileop_pwd_impl(
'(this is the end of the file)\n'
'[File hello.py created.]\n'
'[Jupyter current working directory: /workspace/test]\n'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]'
).strip().split('\n')
if enable_auto_lint:
@@ -283,7 +283,7 @@ Your changes have NOT been applied. Please fix your edit command and try again.
You either need to 1) Specify the correct start/end line arguments or 2) Correct your edit code.
DO NOT re-run the same failed edit command. Running it again will lead to the same error.
[Jupyter current working directory: /workspace/test]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
"""
).strip().split('\n')
@@ -303,7 +303,7 @@ DO NOT re-run the same failed edit command. Running it again will lead to the sa
(this is the end of the file)
[File updated (edited at line 1). Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.]
[Jupyter current working directory: /workspace/test]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]
[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]
"""
).strip().split('\n')
@@ -371,7 +371,7 @@ async def test_ipython_agentskills_fileop_pwd_with_userdir(temp_dir, box_class):
'(this is the end of the file)\n'
'[File hello.py created.]\n'
'[Jupyter current working directory: /root]\n'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]'
).strip().split('\n')
action = CmdRunAction(command='cd test')
@@ -395,7 +395,7 @@ async def test_ipython_agentskills_fileop_pwd_with_userdir(temp_dir, box_class):
'(this is the end of the file)\n'
'[File hello.py created.]\n'
'[Jupyter current working directory: /root/test]\n'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]'
).strip().split('\n')
await runtime.close()
@@ -432,7 +432,7 @@ async def test_ipython_package_install(temp_dir, box_class, run_as_openhands):
assert obs.content.strip() == (
'[Code executed successfully with no output]\n'
'[Jupyter current working directory: /workspace]\n'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.11/bin/python]'
'[Jupyter Python interpreter: /openhands/poetry/openhands-5O4_aCHf-py3.12/bin/python]'
)
await runtime.close()

View File

@@ -358,7 +358,7 @@ def test_defaults_dict_after_updates(default_config):
assert defaults_after_updates['sandbox']['timeout']['default'] == 120
assert (
defaults_after_updates['sandbox']['container_image']['default']
== 'nikolaik/python-nodejs:python3.11-nodejs22'
== 'nikolaik/python-nodejs:python3.12-nodejs22'
)
assert defaults_after_updates == initial_defaults

View File

@@ -62,7 +62,7 @@ def test_put_source_code_to_dir(temp_dir):
def test_docker_build_folder(temp_dir):
prep_docker_build_folder(
temp_dir,
base_image='nikolaik/python-nodejs:python3.11-nodejs22',
base_image='nikolaik/python-nodejs:python3.12-nodejs22',
skip_init=False,
)
@@ -81,14 +81,14 @@ def test_docker_build_folder(temp_dir):
def test_hash_folder_same(temp_dir):
dir_hash_1 = prep_docker_build_folder(
temp_dir,
base_image='nikolaik/python-nodejs:python3.11-nodejs22',
base_image='nikolaik/python-nodejs:python3.12-nodejs22',
skip_init=False,
)
with tempfile.TemporaryDirectory() as temp_dir_2:
dir_hash_2 = prep_docker_build_folder(
temp_dir_2,
base_image='nikolaik/python-nodejs:python3.11-nodejs22',
base_image='nikolaik/python-nodejs:python3.12-nodejs22',
skip_init=False,
)
assert dir_hash_1 == dir_hash_2
@@ -97,14 +97,14 @@ def test_hash_folder_same(temp_dir):
def test_hash_folder_diff_init(temp_dir):
dir_hash_1 = prep_docker_build_folder(
temp_dir,
base_image='nikolaik/python-nodejs:python3.11-nodejs22',
base_image='nikolaik/python-nodejs:python3.12-nodejs22',
skip_init=False,
)
with tempfile.TemporaryDirectory() as temp_dir_2:
dir_hash_2 = prep_docker_build_folder(
temp_dir_2,
base_image='nikolaik/python-nodejs:python3.11-nodejs22',
base_image='nikolaik/python-nodejs:python3.12-nodejs22',
skip_init=True,
)
assert dir_hash_1 != dir_hash_2
@@ -113,7 +113,7 @@ def test_hash_folder_diff_init(temp_dir):
def test_hash_folder_diff_image(temp_dir):
dir_hash_1 = prep_docker_build_folder(
temp_dir,
base_image='nikolaik/python-nodejs:python3.11-nodejs22',
base_image='nikolaik/python-nodejs:python3.12-nodejs22',
skip_init=False,
)
@@ -136,7 +136,7 @@ def test_generate_dockerfile_scratch():
assert 'apt-get update' in dockerfile_content
assert 'apt-get install -y wget sudo apt-utils' in dockerfile_content
assert (
'RUN /openhands/miniforge3/bin/mamba install conda-forge::poetry python=3.11 -y'
'RUN /openhands/miniforge3/bin/mamba install conda-forge::poetry python=3.12 -y'
in dockerfile_content
)
@@ -158,7 +158,7 @@ def test_generate_dockerfile_skip_init():
# These commands SHOULD NOT include in the dockerfile if skip_init is True
assert 'RUN apt update && apt install -y wget sudo' not in dockerfile_content
assert (
'RUN /openhands/miniforge3/bin/mamba install conda-forge::poetry python=3.11 -y'
'RUN /openhands/miniforge3/bin/mamba install conda-forge::poetry python=3.12 -y'
not in dockerfile_content
)
@@ -178,12 +178,12 @@ def test_get_runtime_image_repo_and_tag_eventstream():
and img_tag == f'{OD_VERSION}_image_debian_tag_11'
)
base_image = 'nikolaik/python-nodejs:python3.11-nodejs22'
base_image = 'nikolaik/python-nodejs:python3.12-nodejs22'
img_repo, img_tag = get_runtime_image_repo_and_tag(base_image)
assert (
img_repo == f'{RUNTIME_IMAGE_REPO}'
and img_tag
== f'{OD_VERSION}_image_nikolaik___python-nodejs_tag_python3.11-nodejs22'
== f'{OD_VERSION}_image_nikolaik___python-nodejs_tag_python3.12-nodejs22'
)
base_image = 'ubuntu'