Skip to content

Commit

Permalink
Update FAQ.md, elaborate on how to customise docker image and pick 'p…
Browse files Browse the repository at this point in the history
…ython:3' to solve typical errors (#269)

* Update FAQ.md

* Update website/docs/FAQ.md

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

* Update website/docs/FAQ.md

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

* Update website/docs/FAQ.md

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

---------

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
  • Loading branch information
maxim-saplin and qingyun-wu authored Oct 17, 2023
1 parent f2d7553 commit f594333
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions website/docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,20 @@ We strongly recommend using docker to execute code. There are two ways to use do

1. Run autogen in a docker container. For example, when developing in GitHub codespace, the autogen runs in a docker container.
2. Run autogen outside of a docker, while perform code execution with a docker container. For this option, make sure the python package `docker` is installed. When it is not installed and `use_docker` is omitted in `code_execution_config`, the code will be executed locally (this behavior is subject to change in future).

### Enable Python 3 docker image

You might want to override the default docker image used for code execution. To do that set `use_docker` key of `code_execution_config` property to the name of the image. E.g.:
```python
user_proxy = autogen.UserProxyAgent(
name="agent",
human_input_mode="TERMINATE",
max_consecutive_auto_reply=10,
code_execution_config={"work_dir":"_output", "use_docker":"python:3"},
llm_config=llm_config,
system_message=""""Reply TERMINATE if the task has been solved at full satisfaction.
Otherwise, reply CONTINUE, or the reason why the task is not solved yet."""
)
```

If you have problems with agents running `pip install` or get errors similar to `Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')`, you can choose **'python:3'** as image as shown in the code example above and that should solve the problem.

0 comments on commit f594333

Please sign in to comment.