Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
2 years ago | |
|---|---|---|
| .. | ||
| dev | 2 years ago | |
| full | 2 years ago | |
| studio | 2 years ago | |
| Dockerfile | 2 years ago | |
| README.md | 2 years ago | |
| devcontainer.json | 2 years ago | |
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, is designed for basic setups. It includes common Python libraries and essential dependencies required for general usage of AutoGen.docker build -f ./Dockerfile -t autogen_base_img . in this directory.Code > Codespaces > Click on + By default + creates a Codespace on the current branch../full/Dockerfile is for advanced features. It includes additional dependencies and is configured for more complex or feature-rich AutoGen applications.docker build -f full/Dockerfile -t autogen_full_img ..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/Dockerfile includes tools and configurations aiding in development and contribution.docker build -f dev/Dockerfile -t autogen_dev_img ..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../studio/Dockerfile, includes tools and configurations aiding in development and contribution.docker build -f studio/Dockerfile -t autogen_studio_img ..Code > Codespaces > Click on ...> New with options > Choose "studio" as devcontainer configuration.Feel free to modify these Dockerfiles for your specific project needs. Here are some common customizations:
Adding New Dependencies: If your project requires additional Python packages, you can add them using the RUN pip install command.
Changing the Base Image: You may change the base image (e.g., from a Python image to an Ubuntu image) to suit your project's requirements.
Changing the Python version: do you need a different version of python other than 3.11. Just update the first line of each of the Dockerfiles like so:
FROM python:3.11-slim-bookworm to FROM python:3.10-slim-bookworm
Setting Environment Variables: Add environment variables using the ENV command for any application-specific configurations. We have prestaged the line needed to inject your OpenAI_key into the docker environment as a environmental variable. Others can be staged in the same way. Just uncomment the line.
# ENV OPENAI_API_KEY="{OpenAI-API-Key}" to ENV OPENAI_API_KEY="{OpenAI-API-Key}"
Need a less "Advanced" Autogen build: If the ./full/Dockerfile is to much but you need more than advanced then update this line in the Dockerfile 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 ./base/Dockerfile and ./full/Dockerfile files. In the example below we are installing net-tools and vim to the environment.
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
software-properties-common sudo net-tools vim\
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
After customizing your Dockerfile, build the Docker image using the docker build command as shown above. To run a container based on your new image, use:
docker run -it -v $(pwd)/your_app:/app your_image_name
Replace your_app with your application directory and your_image_name with the name of the image you built.
exit.docker stop {application_project_name}.docker start {application_project_name}.sudo docker exec -it {application_project_name} bash.source /usr/src/app/autogen_env/bin/activate.docker ps -a.docker images.docker stop my_container), remove the container (docker rm my_container), and remove the image (docker rmi my_image:latest).For more information on Docker usage and best practices, refer to the official Docker documentation.
This is a mirror of AutoGen from GitHub. AutoGen is a framework that enables the development of LLM applications using multiple agents that can converse with each other to solve tasks.
Python SVG Jupyter Notebook C# TSX other