Skip to content

Cleanup and unify Dockerfiles #1333

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

Merged
merged 14 commits into from
Jan 23, 2024
33 changes: 24 additions & 9 deletions samples/dockers/Dockerfiles.md → .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
# README for AutoGen Docker Samples
# Dockerfiles and Devcontainer Configurations for AutoGen

Welcome to the `autogen/samples/dockers` directory! Here you'll find Dockerfiles that are essential for setting up your AutoGen development environment. Each Dockerfile is tailored for different use cases and requirements. Below is a brief overview of each and how you can utilize them effectively.
Welcome to the `.devcontainer` directory! Here you'll find Dockerfiles and devcontainer configurations that are essential for setting up your AutoGen development environment. Each Dockerfile is tailored for different use cases and requirements. Below is a brief overview of each and how you can utilize them effectively.

These configurations can be used with Codespaces and locally.

## Dockerfile Descriptions

### Dockerfile.base
### base

- **Purpose**: This Dockerfile is designed for basic setups. It includes common Python libraries and essential dependencies required for general usage of AutoGen.
- **Usage**: Ideal for those just starting with AutoGen or for general-purpose applications.
- **Building the Image**: Run `docker build -f Dockerfile.base -t autogen_base_img .` in this directory.
- **Building the Image**: Run `docker build -f base/Dockerfile -t autogen_base_img .` in this directory.
- **Using with Codespaces**: `Code > Codespaces > Click on ...> New with options > Choose "base" as devcontainer configuration`

### Dockerfile.full
### full

- **Purpose**: This Dockerfile is for advanced features. It includes additional dependencies and is configured for more complex or feature-rich AutoGen applications.
- **Usage**: Suited for advanced users who need the full range of AutoGen's capabilities.
- **Building the Image**: Execute `docker build -f Dockerfile.full -t autogen_full_img .`.
- **Building the Image**: Execute `docker build -f full/Dockerfile -t autogen_full_img .`.
- **Using with Codespaces**: `Code > Codespaces > Click on ...> New with options > Choose "full" as devcontainer configuration`. This image may require a Codespace with at least 64GB of disk space.

### dev

- **Purpose**: Tailored for AutoGen project developers, this Dockerfile includes tools and configurations aiding in development and contribution.
- **Usage**: Recommended for developers who are contributing to the AutoGen project.
- **Building the Image**: Run `docker build -f dev/Dockerfile -t autogen_dev_img .`.
- **Using with Codespaces**: `Code > Codespaces > Click on ...> New with options > Choose "dev" as devcontainer configuration`. This image may require a Codespace with at least 64GB of disk space.
- **Before using**: We highly encourage all potential contributors to read the [AutoGen Contributing](https://microsoft.github.io/autogen/docs/Contribute) page prior to submitting any pull requests.

### Dockerfile.dev

### studio

- **Purpose**: Tailored for AutoGen project developers, this Dockerfile includes tools and configurations aiding in development and contribution.
- **Usage**: Recommended for developers who are contributing to the AutoGen project.
- **Building the Image**: Run `docker build -f Dockerfile.dev -t autogen_dev_img .`.
- **Building the Image**: Run `docker build -f dev/Dockerfile -t autogen_dev_img .`.
- **Using with Codespaces**: `Code > Codespaces > Click on ...> New with options > Choose "studio" as devcontainer configuration`.
- **Before using**: We highly encourage all potential contributors to read the [AutoGen Contributing](https://microsoft.github.io/autogen/docs/Contribute) page prior to submitting any pull requests.


## Customizing Dockerfiles

Feel free to modify these Dockerfiles for your specific project needs. Here are some common customizations:
Expand All @@ -35,7 +50,7 @@ Feel free to modify these Dockerfiles for your specific project needs. Here are
`# ENV OPENAI_API_KEY="{OpenAI-API-Key}"` to `ENV OPENAI_API_KEY="{OpenAI-API-Key}"`
- **Need a less "Advanced" Autogen build**: If the Dockerfile.full is to much but you need more than advanced then update this line in the Dockerfile.full file.
`RUN pip install pyautogen[teachable,lmm,retrievechat,mathchat,blendsearch] autogenra` to install just what you need. `RUN pip install pyautogen[retrievechat,blendsearch] autogenra`
- **Can't Dev without your favorite CLI tool**: if you need particular OS tools to be installed in your Docker container you can add those packages here right after the sudo for the Dockerfile.base and Dockerfile.full files. In the example below we are installing net-tools and vim to the environment.
- **Can't Dev without your favorite CLI tool**: if you need particular OS tools to be installed in your Docker container you can add those packages here right after the sudo for the `base/Dockerfile` and `full/Dockerfile.full` files. In the example below we are installing net-tools and vim to the environment.

```code
RUN apt-get update \
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions .devcontainer/base/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dockerFile": "Dockerfile"
}
File renamed without changes.
3 changes: 3 additions & 0 deletions .devcontainer/dev/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dockerFile": "Dockerfile"
}
File renamed without changes.
3 changes: 3 additions & 0 deletions .devcontainer/full/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dockerFile": "Dockerfile"
}