Skip to content

Commit

Permalink
document about docker (#119)
Browse files Browse the repository at this point in the history
* document about docker

* clarify

* dev container
  • Loading branch information
sonichi committed Oct 5, 2023
1 parent 5c2a268 commit 20d77a1
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,18 @@ pip install pyautogen
```

Minimal dependencies are installed without extra options. You can install extra options based on the feature you need.
For example, use the following to install the dependencies needed by the [`blendsearch`](https://microsoft.github.io/FLAML/docs/Use-Cases/Tune-User-Defined-Function#blendsearch-economical-hyperparameter-optimization-with-blended-search-strategy) option.
<!-- For example, use the following to install the dependencies needed by the [`blendsearch`](https://microsoft.github.io/FLAML/docs/Use-Cases/Tune-User-Defined-Function#blendsearch-economical-hyperparameter-optimization-with-blended-search-strategy) option.
```bash
pip install "pyautogen[blendsearch]"
```
``` -->

Find more options in [Installation](https://microsoft.github.io/autogen/docs/Installation).
<!-- Each of the [`notebook examples`](https://github.com/microsoft/autogen/tree/main/notebook) may require a specific option to be installed. -->
For [code execution](https://microsoft.github.io/autogen/FAQ#code-execution), we strongly recommend installing the python docker package, and using docker.

For LLM inference configurations, check the [FAQ](https://microsoft.github.io/autogen/docs/FAQ#set-your-api-endpoints).


## Quickstart

## Multi-Agent Conversation Framework
Expand Down
6 changes: 3 additions & 3 deletions autogen/agentchat/conversable_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ def __init__(
If a list or a str of image name(s) is provided, the code will be executed in a docker container
with the first image successfully pulled.
If None, False or empty, the code will be executed in the current environment.
Default is True, which will be converted into a list.
If the code is executed in the current environment,
the code must be trusted.
Default is True when the docker python package is installed.
When set to True, a default list will be used.
We strongly recommend using docker for code execution.
- timeout (Optional, int): The maximum execution time in seconds.
- last_n_messages (Experimental, Optional, int): The number of messages to look back for code execution. Default to 1.
llm_config (dict or False): llm inference configuration.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/Contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ docker run -it autogen-dev
### Develop in Remote Container

If you use vscode, you can open the autogen folder in a [Container](https://code.visualstudio.com/docs/remote/containers).
We have provided the configuration in [devcontainer](https://github.com/microsoft/autogen/blob/main/.devcontainer).
We have provided the configuration in [devcontainer](https://github.com/microsoft/autogen/blob/main/.devcontainer). They can be used in GitHub codespace too. Developing AutoGen in dev containers is recommended.

### Pre-commit

Expand Down
7 changes: 7 additions & 0 deletions website/docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,10 @@ in the system message. This line is in the default system message of the `Assist

If the `# filename` doesn't appear in the suggested code still, consider adding explicit instructions such as "save the code to disk" in the initial user message in `initiate_chat`.
The `AssistantAgent` doesn't save all the code by default, because there are cases in which one would just like to finish a task without saving the code.

## Code execution

We strongly recommend using docker to execute code. There are two ways to use docker:

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).
4 changes: 1 addition & 3 deletions website/docs/Getting-Started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


# Getting Started

<!-- ### Welcome to AutoGen, a library for enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework! -->
Expand All @@ -21,7 +19,7 @@ AutoGen is powered by collaborative [research studies](/docs/Research) from Micr
### Quickstart

Install from pip: `pip install pyautogen`. Find more options in [Installation](/docs/Installation).

For [code execution](https://microsoft.github.io/autogen/FAQ#code-execution), we strongly recommend installing the python docker package, and using docker.

#### Multi-Agent Conversation Framework
Autogen enables the next-gen LLM applications with a generic multi-agent conversation framework. It offers customizable and conversable agents which integrate LLMs, tools and human.
Expand Down
5 changes: 5 additions & 0 deletions website/docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ conda install pyautogen -c conda-forge
``` -->

### Optional Dependencies
* docker
We strongly recommend using docker for code execution or running AutoGen in a docker container (e.g., when developing in GitHub codespace, the autogen runs in a docker container). To use docker for code execution, you also need to install the python package `docker`:
```bash
pip install docker
```

* blendsearch
```bash
Expand Down

0 comments on commit 20d77a1

Please sign in to comment.