Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run SWE-agent on x86_64 WSL2 due to latest sweagent ARM64 image getting pulled instead of linux/amd64 #107

Closed
HuggingLocalAvailableModels opened this issue Apr 6, 2024 · 5 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@HuggingLocalAvailableModels

Description:

I am trying to run the SWE-agent Docker container on a Windows Subsystem for Linux (WSL2) environment with x86_64 architecture. However, I am encountering an issue where the pulled Docker image is always the ARM64 version, even when specifying the linux/amd64 platform.

Steps to Reproduce:

  1. Set up WSL2 on Windows with an x86_64 Linux distribution (Ubuntu 20.04).
  2. Install Docker and ensure it is running properly.
  3. Run the following command to pull the SWE-agent image:
docker pull --platform linux/amd64 sweagent/swe-agent-run:latest
  1. Run the SWE-agent container using the following command:
export DOCKER_DEFAULT_PLATFORM=linux/amd64
docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock \
  -v /home/89/144/233:/data \
  -e OPENAI_API_KEY="4040404" \
  sweagent/swe-agent-run:latest \
  python run.py --data_path /data --verbose --image_name=sweagent/swe-agent:latest --container_name 42CONTAINER

Expected Behavior:

The SWE-agent Docker container should run successfully using the x86_64 (amd64) image on the WSL2 environment.

Actual Behavior:

Despite specifying the linux/amd64 platform using the --platform flag during the docker pull command and setting the DOCKER_DEFAULT_PLATFORM environment variable to linux/amd64, the pulled Docker image is always the ARM64 version. The container fails to run due to the architecture mismatch, with the following error message:

docker: image with reference docker.io/sweagent/swe-agent-run:latest was found but does not match the specified platform: wanted linux/amd64, actual: linux/arm64/v8.

Environment:

  • Operating System: Windows 10
  • WSL2 Version: 2
  • Linux Distribution: Ubuntu 20.04
  • Docker Version: 20.10.17
  • SWE-agent Version: Latest

Additional Information:

  • The output of uname -m in the WSL2 environment is x86_64, confirming that the Linux distribution is running on x86_64 architecture.
  • I have tried specifying the platform using both the --platform flag during docker pull and the DOCKER_DEFAULT_PLATFORM environment variable, but the issue persists.
  • I am using Visual Studio Code with the Remote - WSL extension to develop inside the WSL2 environment. VS Code is installed on Windows, not in the WSL2 filesystem.

Please let me know if you need any further information or if there are any additional steps I can take to resolve this issue.

@HuggingLocalAvailableModels HuggingLocalAvailableModels changed the title Unable to run SWE-agent on x86_64 WSL2 due to ARM64 image pulled instead of linux/amd64 Unable to run SWE-agent on x86_64 WSL2 due to latest sweagent ARM64 image getting pulled instead of linux/amd64 Apr 6, 2024
@klieret
Copy link
Member

klieret commented Apr 6, 2024

@carlosejimenez is currently working this, thanks for your report!

@klieret
Copy link
Member

klieret commented Apr 8, 2024

Can you try using klieret/swe-agent-run and klieret/swe-agent together with --platform=linux/amd64? I believe it should work

@klieret
Copy link
Member

klieret commented Apr 8, 2024

I.e.,

docker pull klieret/swe-agent:latest --platform=linux/amd64     

then

 docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock \ 
 -v /Users/fuchur/Documents/24/git_sync/swe-agent/keys.cfg:/app/keys.cfg --platform=linux/amd64\
  klieret/swe-agent-run:latest  \
  python run.py --image_name=klieret/swe-agent:latest \
  --model_name gpt4 \
  --data_path https://github.com/pvlib/pvlib-python/issues/1603 \
  --config_file config/default_from_url.yaml  --skip_existing=False

@RudolphSikorskiy
Copy link

It works! Thank you for help)

@klieret
Copy link
Member

klieret commented Apr 8, 2024

Great! Then I'll make those images the official ones :)

@klieret klieret closed this as completed Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants