Sign inSign up

stephenlzc/autogenstudio

By stephenlzc

•Updated over 1 year ago

Running autogenstudio with docker

Image
1

935

stephenlzc/autogenstudio repository overview

⁠AutoGen Studio Docker 镜像 / AutoGen Studio Docker Image

Docker Pulls
License

欢迎使用 AutoGen Studio Docker 镜像!
Welcome to the AutoGen Studio Docker Image!


⁠核心功能 / Core Features

⁠预配置环境 / Pre-configured Environment
  • 基于 Python 3.12 的优化运行时
    Optimized runtime based on Python 3.12

  • 预装 AutoGen Studio 核心组件
    Pre-installed AutoGen Studio core components

  • 集成 Gunicorn 生产服务器
    Integrated Gunicorn production server

  • 支持 SQLite 数据库
    SQLite database support


⁠快速启动 / Quick Start

⁠基础运行 / Quick Run

简单的一行命令即可启动容器:
Run the container with a single command:

docker run -d -p 10042:10042 stephenlzc/autogenstudio

为了更好地管理项目文件和配置,推荐如下运行方式: For better management of project files and configurations, it is recommended to run:

docker run -d \
  -p 10042:10042 \
  -v $(pwd)/myapp:/app/myapp \
  -v $(pwd)/configs:/app/configs \
  --user $UID:$GID \
  autogenstudio

⁠Dockerfile 详解 / Dockerfile Explanation

以下 Dockerfile 展示了从基础镜像构建到运行 AutoGen Studio 的详细过程。 The following Dockerfile details the process from base image setup to running AutoGen Studio.

FROM python:3.12-slim

RUN apt-get update && apt-get install -y \
    build-essential \
    libjpeg-dev \
    zlib1g-dev \
 && rm -rf /var/lib/apt/lists/*

ARG USER_ID=1000
ARG GROUP_ID=1000
RUN groupadd -g ${GROUP_ID} appuser && \
    useradd -u ${USER_ID} -g appuser -m appuser && \
    mkdir -p /app/myapp && \
    chown -R appuser:appuser /app

WORKDIR /app

RUN pip install -U autogenstudio

USER appuser

EXPOSE 10042

CMD ["sh", "-c", "mkdir -p /app/myapp && autogenstudio ui --port 10042 --host 0.0.0.0 --appdir /app/myapp"]
⁠构建与运行 Docker 镜像 / Build and Run the Docker Image

请按照以下步骤构建并运行镜像: Follow the steps below to build and run the image:

export UID=$(id -u)
export GID=$(id -g)
⁠构建镜像 / Build the image
docker build -t autogenstudio --build-arg USER_ID=$UID --build-arg GROUP_ID=$GID .
docker run -d \
  -p 10042:10042 \
  -v $(pwd)/myapp:/app/myapp \
  -v $(pwd)/configs:/app/configs \
  --user $UID:$GID \
  autogenstudio

在这份文档中,我们旨在提供一个简洁、实用且中英文对照的指南,让开发者能够轻松上手 AutoGen Studio Docker 镜像。 This document is designed to provide a concise, practical, and bilingual guide so that developers can quickly get started with the AutoGen Studio Docker Image. 如有疑问或建议,欢迎与我们联系([email protected]⁠)。 If you have any questions or suggestions, feel free to reach out at [email protected]⁠.

Tag summary

Content type

Image

Digest

sha256:c14e9479e…

Size

493.4 MB

Last updated

over 1 year ago

docker pull stephenlzc/autogenstudio