Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| # Cài đặt các thư viện cần thiết | |
| RUN apt-get update && apt-get install -y --no-install-recommends wget ca-certificates && rm -rf /var/lib/apt/lists/* | |
| # Tải Stockfish binary từ GitHub | |
| RUN wget -q https://github.com/official-stockfish/Stockfish/releases/download/sf_16/stockfish-ubuntu-x86-64-avx2.tar -O /tmp/stockfish.tar && \ | |
| tar -xf /tmp/stockfish.tar -C /tmp && \ | |
| mv /tmp/stockfish/stockfish-ubuntu-x86-64-avx2 /usr/local/bin/stockfish && \ | |
| chmod +x /usr/local/bin/stockfish && \ | |
| rm -rf /tmp/stockfish.tar /tmp/stockfish | |
| # Cài đặt các gói Python | |
| RUN pip install fastapi uvicorn[standard] python-chess | |
| WORKDIR /app | |
| COPY . . | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |