# 使用官方python镜像 FROM python:3.10-slim # 设置工作目录 WORKDIR /app # 复制依赖文件 COPY requirements.txt . # 安装依赖 RUN pip install 'volcengine-python-sdk[ark]' -i https://pypi.tuna.tsinghua.edu.cn/simple RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple # 复制项目文件 COPY . . # 暴露gunicorn服务端口 EXPOSE 8000 # 启动gunicorn服务:端口号为gunicorn服务端口 CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]