microsoft / autogen

A programming framework for agentic AI. Discord: https://aka.ms/autogen-dc. Roadmap: https://aka.ms/autogen-roadmap
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
28.12k stars 4.11k forks source link

[Bug]: UserProxyAgent code_execution_config "use_docker": False doesn't cancel docker requirement and in WSL couldn't detected Docker #3041

Open dtunai opened 6 days ago

dtunai commented 6 days ago

Describe the bug

Hi Autogen community,

I have Autogen set up to run on my WSL 2 Ubuntu 22.04 environment. Inside my service, there is an Autogen agents setup. One of the agents in this setup, UserProxyAgent, still requires Docker even when I pass "use_docker": False. When I tested this option on MacOS, I saw the same result. It seems to me that the "use_docker" config option is somehow not canceling the Docker requirement.

Below is my agent:

exec_agent = autogen.UserProxyAgent(
    name="Exec",
    system_message="Executor. You follow the plan. Execute the code written by the coder agent and return outcomes.",
    human_input_mode="NEVER",
    code_execution_config={"last_n_messages": 12, "work_dir": code_dir, "use_docker": False},
    llm_config=llm_config,
)

To solve this issue, I needed to pass os.environ["AUTOGEN_USE_DOCKER"] = "no", and then it worked.

Beyond this issue also, in the same WSL environment, even though Docker was running and WSL 2 Backend was enabled in the Docker Engine on the Windows 11 side, it could not detect it.

Thanks!

Steps to reproduce

  1. Create a WSL 2 Ubuntu 22.04 environment in Windows 11.
  2. Install Docker in the environment.
  3. Create a dummy UserProxyAgent and test it with the use_docker: True or False options.

Model Used

gpt-4

Expected Behavior

Docker should have been not required for this environment.

Screenshots and logs

No response

Additional Information

AutoGen version: 0.2.31 OS: Ubuntu 22.04 Python: 3.10.8