This repository contains a Docker Compose setup for running Autogen Studio. The Docker Compose setup allows for more flexibility and easier management of environment variables through an .env file.
- Clone this repo:
git clone github.com:stracker-phil/autogen-studio-docker.git - Copy
.env.exampleto.envand insert your OpenAI API key - Run
docker compose up --build - Navigate to
http://localhost:8081
Ensure you have Docker and Docker Compose installed on your machine.
When using a Mac, OrbStack is the recommended solution.
Create a .env file in the root of this repository and add the following environment variables:
HOST_PORT=8081 OPENAI_API_KEY=sk-1234567 # Insert your OpenAI API keyReplace sk-1234567 with your actual OpenAI API key.
Building and Running the Docker Compose Setup
To build and run the Autogen Studio using Docker Compose, run the following command in the root of this repository:
# First time only: Build the container: docker-compose up --build # Starting the already built container: docker-compose upThis will build the Docker image and start the Autogen Studio in a Docker container. The Autogen Studio will be available at http://localhost:${HOST_PORT}.
Stopping the Docker Compose Setup
To stop the Docker Compose setup, press Ctrl+C in the terminal where docker-compose up is running, or run the following command in the root of this repository:
docker-compose downIf a custom Skill requires an API key or other private data, add those items to the .env file and restart the docker container:
docker compose down docker compose upUse the os.getenv() Python function in the Skill to access the values from your .env file:
import os api_base = os.getenv('SMART_CONNECT_URL') ...With this Docker Compose setup, you can easily run Autogen Studio on your local machine. Custom .env variables and the persisted SQLite database provide additional convenience.
Video introduction to AutoGen Studio: https://www.youtube.com/watch?v=4ZqJSfV4818
- Note: Ignore all the Conda and ENV-variable setup. This is handled by Docker.