owl/.container/docker-compose.yml
2025-03-16 02:44:02 +08:00

40 lines
1.0 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
# 挂载数据目录
- ./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: