Spaces:
Sleeping
Sleeping
File size: 529 Bytes
919e70c b3e66ee 919e70c b3e66ee be61757 919e70c b3e66ee 919e70c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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"] |