Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # 安装 git 和基础依赖 | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| # 先克隆 lichess-bot 仓库 | |
| RUN git clone https://github.com/ShailChoksi/lichess-bot.git /app/lichess-bot | |
| COPY requirements.txt . | |
| # 🌟 关键修改:同时安装 lichess-bot 官方的依赖 + 我们的依赖 | |
| RUN pip install --no-cache-dir -r /app/lichess-bot/requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 复制我们自己的引擎和程序 | |
| COPY engine.py /app/engine.py | |
| COPY app.py /app/app.py | |
| RUN chmod +x /app/engine.py | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |