crawl4ai / Dockerfile
a8926764's picture
Update Dockerfile
e6df91e verified
raw
history blame contribute delete
351 Bytes
FROM unclecode/crawl4ai:latest
# 设置内存限制环境变量
ENV PYTHONUNBUFFERED=1 \
MAX_MEMORY_USAGE=512MB \
BROWSER_MAX_INSTANCES=1
# 使用单worker模式,避免内存竞争
CMD ["gunicorn", "server:app", "--bind", "0.0.0.0:7860", "--workers", "1", "--worker-class", "uvicorn.workers.UvicornWorker", "--timeout", "120", "--preload"]