Spaces:
Sleeping
Sleeping
Download Dockerfile from Fu01978/Chess_Analyzer: direct link, hf CLI and curl.
- Browser
- Download file 529 Bytes
-
https://huggingface.co/spaces/Fu01978/Chess_Analyzer/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Fu01978/Chess_Analyzer/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Fu01978/Chess_Analyzer/resolve/main/Dockerfile
529 Bytes
| FROM python:3.10-slim | |
| # Install Stockfish as root | |
| RUN apt-get update && apt-get install -y stockfish curl && rm -rf /var/lib/apt/lists/* | |
| # Create a non-root user and set up the working directory | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:/usr/games:$PATH | |
| WORKDIR $HOME/app | |
| # Copy files and ensure the 'user' owns them | |
| COPY --chown=user . . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Explicitly find and export Stockfish path | |
| RUN chmod +x setup.sh | |
| CMD ["./setup.sh"] |