Spaces:
Sleeping
Sleeping
Upload Dockerfile
Browse files17 unmodified lines181920212223242526272829303132333435363738394041424344454647484950515253545517 unmodified linesCOPY . .# ============================================================# BULLETPROOF ENGINE BUILD# ============================================================RUN echo "Searching for Makefile..." && \MAKE_PATH=$(find . -name "Makefile" | head -n 1) && \if [ -n "$MAKE_PATH" ]; then \echo "Found Makefile at: $MAKE_PATH"; \MAKE_DIR=$(dirname "$MAKE_PATH"); \cd "$MAKE_DIR" && \make -j$(nproc) ARCH=x86-64-modern || echo "Compilation failed!"; \if [ -f "stockfish" ]; then \cp stockfish /app/engine/deepcastle; \echo "Successfully built engine from source!"; \fi; \else \echo "No Makefile found in the repository!"; \fi# ============================================================# FAILSAFE: DOWNLOAD LINUX BINARY IF SOURCE FAILED# ============================================================WORKDIR /app/engineRUN if [ ! -f "deepcastle" ]; then \echo "Using Failsafe: Downloading pre-compiled high-performance Linux brain..."; \wget https://github.com/official-stockfish/Stockfish/releases/latest/download/stockfish-ubuntu-x86-64-modern.tar.xz && \tar -xvf stockfish-ubuntu-x86-64-modern.tar.xz && \cp stockfish/stockfish-* deepcastle && \rm -rf stockfish*; \fi && chmod +x deepcastle# Fallback: Download official NNUE if output.nnue is missingRUN if [ ! -f "output.nnue" ]; then \echo "Neural network missing. Downloading optimized brain..." && \wget https://tests.stockfishchess.org/api/nn/nn-ae6a455a-c521-4f11-923f-5626359074df.nnue -O output.nnue; \fi17 unmodified lines181920212223242526272829303132333435363738394041424344454647484950515217 unmodified linesCOPY . .# ============================================================# BULLETPROOF ENGINE BUILD (Optimized for Deepcastle v7)# ============================================================RUN echo "Commencing Engine Build..." && \MAKE_PATH=$(find . -name "Makefile" | head -n 1) && \if [ -n "$MAKE_PATH" ]; then \MAKE_DIR=$(dirname "$MAKE_PATH"); \cd "$MAKE_DIR" && \echo "Building in $MAKE_DIR..." && \make -j$(nproc) build ARCH=x86-64-sse41-popcnt || echo "Source build failed!"; \if [ -f "stockfish" ]; then \mkdir -p /app/engine && \cp stockfish /app/engine/deepcastle; \fi; \fi# ============================================================# FAILSAFE: Linux Binary (Reliable Mirror)# ============================================================WORKDIR /app/engineRUN if [ ! -f "deepcastle" ]; then \echo "Using Failsafe: Downloading Rock-Solid Linux Release..."; \wget https://github.com/official-stockfish/Stockfish/releases/download/sf_17/stockfish-ubuntu-x86-64-sse41-popcnt.tar.xz && \tar -xvf stockfish-ubuntu-x86-64-sse41-popcnt.tar.xz && \cp stockfish/stockfish-ubuntu-x86-64-sse41-popcnt deepcastle && \rm -rf stockfish*; \fi && chmod +x deepcastle# Fallback: NNUEoptimized brainRUN if [ ! -f "output.nnue" ]; then \wget https://tests.stockfishchess.org/api/nn/nn-ae6a455a-c521-4f11-923f-5626359074df.nnue -O output.nnue; \fi
Dockerfile+11-14