mirror of
https://github.com/camel-ai/owl.git
synced 2025-12-26 10:07:51 +08:00
40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
services:
|
||
owl:
|
||
# Option 1: Use pre-built image from Docker Hub
|
||
# 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
|
||
|
||
volumes:
|
||
# 挂载.env文件,方便配置API密钥
|
||
- ../owl/.env:/app/owl/.env
|
||
# 挂载数据目录
|
||
- ./data:/app/data
|
||
# 挂载缓存目录,避免重复下载
|
||
- ~/.cache/pip:/root/.pip/cache
|
||
- ~/.cache/playwright:/root/.cache/ms-playwright
|
||
environment:
|
||
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
||
- DISPLAY=:99
|
||
- PYTHONDONTWRITEBYTECODE=1
|
||
- PYTHONUNBUFFERED=1
|
||
- TERM=xterm-256color
|
||
ports:
|
||
- "7860:7860"
|
||
stdin_open: true
|
||
tty: true
|
||
shm_size: 2gb
|
||
# 简化资源限制
|
||
deploy:
|
||
resources:
|
||
limits:
|
||
memory: 4G
|
||
|
||
# 定义持久化卷,用于缓存 | Define persistent volumes for caching
|
||
volumes:
|
||
playwright-cache:
|
||
pip-cache: |