Files
owl/.container/docker-compose.yml
2025-03-14 20:47:22 +08:00

34 lines
835 B
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:
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:
- "8000:8000"
stdin_open: true
tty: true
shm_size: 2gb
# 简化资源限制
deploy:
resources:
limits:
memory: 4G
# 定义持久化卷,用于缓存 | Define persistent volumes for caching
volumes:
playwright-cache:
pip-cache: