Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -1
Dockerfile
CHANGED
|
@@ -1,7 +1,16 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
|
|
|
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
RUN pip install fastapi uvicorn[standard] python-chess
|
| 6 |
|
| 7 |
WORKDIR /app
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Cài đặt các thư viện cần thiết
|
| 4 |
+
RUN apt-get update && apt-get install -y --no-install-recommends wget ca-certificates && rm -rf /var/lib/apt/lists/*
|
| 5 |
|
| 6 |
+
# Tải Stockfish binary từ GitHub
|
| 7 |
+
RUN wget -q https://github.com/official-stockfish/Stockfish/releases/download/sf_16/stockfish-ubuntu-x86-64-avx2.tar -O /tmp/stockfish.tar && \
|
| 8 |
+
tar -xf /tmp/stockfish.tar -C /tmp && \
|
| 9 |
+
mv /tmp/stockfish/stockfish-ubuntu-x86-64-avx2 /usr/local/bin/stockfish && \
|
| 10 |
+
chmod +x /usr/local/bin/stockfish && \
|
| 11 |
+
rm -rf /tmp/stockfish.tar /tmp/stockfish
|
| 12 |
+
|
| 13 |
+
# Cài đặt các gói Python
|
| 14 |
RUN pip install fastapi uvicorn[standard] python-chess
|
| 15 |
|
| 16 |
WORKDIR /app
|