Sign inSign up

1009835447/openmanus

By 1009835447

•Updated over 1 year ago

Image
0

987

1009835447/openmanus repository overview

参考:iszmxw/OpenManus-Docker: OpenManus-Docker⁠

image size

~# docker image ls openmanus-docker-openmanus 
REPOSITORY                   TAG       IMAGE ID       CREATED         SIZE
openmanus-docker-openmanus   latest    24c322a2aa9d   2 minutes ago   6.79GB

Dockerfile

# 使用官方 Python 3.12 镜像作为基础镜像
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.12-slim

# 设置工作目录
WORKDIR /app

# 配置中国镜像源
RUN rm -rf /etc/apt/sources.list.d/* && \
    echo "deb https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
    echo "deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
    echo "deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
    echo "deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list

# 安装系统依赖和 git
RUN apt-get update && apt-get install -y \
    git \
    && rm -r /var/lib/apt/lists/*

# 克隆 OpenManus 仓库(包含 requirements.txt 和 config/config.example.toml)
RUN git clone https://github.com/mannaandpoem/OpenManus.git .

# 安装 Python 依赖,通过国内镜像源
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

# 创建 config 目录并复制示例配置文件(如果需要覆盖,可通过 volume 挂载)
RUN mkdir -p config && cp config/config.example.toml config/config.toml

# 启动命令
CMD ["python", "main.py"]

docker-compose.yml

version: "3.9"

services:
  openmanus:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: openmanus
    restart: unless-stopped
    volumes:
      - ./config:/app/config # 挂载 config 目录
    env_file:
      - .env # 统一管理环境变量
    tty: true
    stdin_open: true
    command: ["python", "${OPENMANUS_ENTRY:-main.py}"]

.env

LLM_API_KEY=sk-... # 替换为真实的 API 密钥
LLM_MODEL=gpt-4o
LLM_BASE_URL=https://api.openai.com/v1
LLM_MAX_TOKENS=4096
LLM_TEMPERATURE=0.0
OPENMANUS_ENTRY=main.py # 可修改为 run_flow.py

Tag summary

Content type

Image

Digest

sha256:84e56766b…

Size

3.3 GB

Last updated

over 1 year ago

docker pull 1009835447/openmanus