FROM aiec-rag:latest # 安装Redis客户端和gunicorn RUN pip install redis gunicorn # 复制带缓存的服务文件 COPY rag_api_server_with_cache.py /app/ # 使用gunicorn启动,支持多worker CMD ["gunicorn", "rag_api_server_with_cache:app", \ "--workers", "10", \ "--worker-class", "uvicorn.workers.UvicornWorker", \ "--bind", "0.0.0.0:8081", \ "--timeout", "120", \ "--keep-alive", "5"]