FROM python:3.13-slim WORKDIR /app # 复制依赖文件 COPY requirements.txt . # 安装依赖 RUN pip install --no-cache-dir -r requirements.txt # 复制项目文件 COPY . . # 暴露端口 EXPOSE 7860 # 启动命令 CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]