Spaces:
Sleeping
Sleeping
Download Dockerfile from Ckit-nodes/Stockfish-e2: direct link, hf CLI and curl.
- Browser
- Download file 804 Bytes
-
https://huggingface.co/spaces/Ckit-nodes/Stockfish-e2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Ckit-nodes/Stockfish-e2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Ckit-nodes/Stockfish-e2/resolve/main/Dockerfile
804 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install dependencies needed for python execution | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Download, extract, and install Stockfish using Python to bypass wget issues | |
| RUN set -ex && \ | |
| python -c "import urllib.request; urllib.request.urlretrieve('https://github.com/official-stockfish/Stockfish/releases/download/sf_18/stockfish-ubuntu-x86-64-avx2.tar', 'stockfish.tar')" && \ | |
| tar -xf stockfish.tar && \ | |
| STOCKFISH_BIN=$(find . -type f -name "*stockfish*x86-64*" -executable | head -n 1) && \ | |
| mv "$STOCKFISH_BIN" /usr/local/bin/stockfish && \ | |
| rm -rf stockfish.tar stockfish* && \ | |
| chmod +x /usr/local/bin/stockfish | |
| COPY app.py . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |