mirror of
https://github.com/camel-ai/owl.git
synced 2025-12-26 02:06:20 +08:00
update docker
This commit is contained in:
parent
35aa778b11
commit
bad6cc0995
@ -15,20 +15,15 @@ WORKDIR /app
|
||||
# 安装系统依赖(合并为一个RUN命令减少层数)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl git ffmpeg libsm6 libxext6 xvfb xauth x11-utils \
|
||||
vim \
|
||||
build-essential python3-dev \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# 复制项目文件
|
||||
COPY owl/ ./owl/
|
||||
COPY licenses/ ./licenses/
|
||||
COPY assets/ ./assets/
|
||||
COPY examples/ ./examples/
|
||||
COPY README.md .
|
||||
COPY README_zh.md .
|
||||
COPY pyproject.toml .
|
||||
|
||||
# 创建README.md文件以避免构建错误
|
||||
RUN echo "# OWL Project\n\n这是OWL项目的Docker环境。" > README.md
|
||||
# 复制pyproject.toml文件
|
||||
COPY pyproject.toml .
|
||||
COPY README.md .
|
||||
|
||||
# 安装uv工具
|
||||
RUN pip install uv
|
||||
|
||||
@ -38,6 +33,12 @@ RUN uv venv .venv --python=3.10 && \
|
||||
uv pip install -e .
|
||||
|
||||
|
||||
# 复制项目文件
|
||||
COPY owl/ ./owl/
|
||||
COPY licenses/ ./licenses/
|
||||
COPY assets/ ./assets/
|
||||
COPY examples/ ./examples/
|
||||
COPY README_zh.md .
|
||||
|
||||
|
||||
# 创建启动脚本
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
services:
|
||||
owl:
|
||||
# Option 1: Use pre-built image from Docker Hub
|
||||
image: mugglejinx/owl:latest
|
||||
# image: mugglejinx/owl:latest
|
||||
|
||||
# Option 2: Build image locally
|
||||
# Uncomment the following lines and comment out the 'image' line above to build locally
|
||||
# build:
|
||||
# context: ..
|
||||
# dockerfile: .container/Dockerfile
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: .container/Dockerfile
|
||||
|
||||
volumes:
|
||||
# 挂载.env文件,方便配置API密钥
|
||||
@ -24,7 +24,7 @@ services:
|
||||
- PYTHONUNBUFFERED=1
|
||||
- TERM=xterm-256color
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- "7860:7860"
|
||||
stdin_open: true
|
||||
tty: true
|
||||
shm_size: 2gb
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user