Files
owl/.container/docker-compose.yml
AnthonyT 606b8799fb Add missing directory to Docker container mount
A previously omitted directory '~/examples' was missing from the Docker container mount configuration. This has now been added to ensure proper functionality.
2025-03-17 12:18:06 +08:00

43 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
# 挂载example文件夹以支持docker容器内运行代码案例
- ../examples:/app/examples
# 挂载数据目录
- ./data:/app/owl/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: