123456FROM python:3.9-slim # 使用轻量级基础镜像WORKDIR /appCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt # 无缓存安装依赖COPY . .CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] # 暴露端口 7860