Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files6 unmodified lines789101112131415162 unmodified lines19202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879806 unmodified linesmake \g++ \wget \git \findutils \curl \xz-utils \&& rm -rf /var/lib/apt/lists/*# Set working directory2 unmodified lines# Copy ALL files from the repositoryCOPY . .# DEBUG: List all files to see what actually arrived from GitHubRUN echo "--- REPOSITORY CONTENT DEBUG ---" && \ls -R /app && \echo "---------------------------------"# ============================================================# DUAL-BRAIN ENGINE BUILD# ============================================================RUN echo "Cloning Stockfish 17 Stable branch..." && \git clone --depth 1 --branch sf_17 https://github.com/official-stockfish/Stockfish.git /app/clean_engineWORKDIR /app/clean_engine/srcRUN make -j$(nproc) build ARCH=x86-64-modern && \mkdir -p /app/engine && \cp stockfish /app/engine/deepcastle && \chmod +x /app/engine/deepcastle# ============================================================# LAUNCHER PREPARATION (The Search & Destroy Fix)# ============================================================WORKDIR /appRUN echo "Searching for Launcher (main.py)..." && \LAUNCHER_PATH=$(find /app -name "main.py" | head -n 1) && \if [ -n "$LAUNCHER_PATH" ]; then \echo "Found launcher at: $LAUNCHER_PATH. Copying to root..."; \cp "$LAUNCHER_PATH" /app/launcher.py; \else \echo "CRITICAL ERROR: main.py not found in the repository!"; \exit 1; \fi# ============================================================# BRAIN PLACEMENT (The Custom Sync)# ============================================================# Map your custom brain (output.nnue) correctly for the serverRUN mkdir -p /app/engine && \find /app -maxdepth 1 -name "*.nnue" -exec cp {} /app/engine/output.nnue \; || echo "No custom NNUE found."# Download standard brains as fallback into the engine folderWORKDIR /app/engineRUN wget -q https://tests.stockfishchess.org/api/nn/nn-9a0cc2a62c52.nnue && \wget -q https://tests.stockfishchess.org/api/nn/nn-47fc8b7fff06.nnue && \chmod -R 777 /app/engine# ============================================================# BACKEND SETUP# ============================================================WORKDIR /appRUN pip install --no-cache-dir fastapi uvicorn chess==1.11.2 pydantic# Explicit Paths for Engine & BrainENV ENGINE_PATH=/app/engine/deepcastleENV NNUE_PATH=/app/engine/output.nnueENV PYTHONPATH="/app:/app/server"EXPOSE 7860# START: Use the guaranteed launcher in the rootCMD ["python3", "/app/launcher.py"]6 unmodified lines7891011121314152 unmodified lines1819202122232425262728293031323334353637383940414243444546474849505152535455565758596 unmodified linesmake \g++ \wget \curl \xz-utils \findutils \&& rm -rf /var/lib/apt/lists/*# Set working directory2 unmodified lines# Copy ALL files from the repositoryCOPY . .# ============================================================# CUSTOM DEEPCASTLE ENGINE BUILD (From your src)# ============================================================WORKDIR /app/engine/srcRUN make -j$(nproc) build ARCH=x86-64-modern && \mkdir -p /app/engine_bin && \cp stockfish /app/engine_bin/deepcastle && \chmod +x /app/engine_bin/deepcastle# ============================================================# LAUNCHER PREPARATION# ============================================================WORKDIR /appRUN LAUNCHER_PATH=$(find /app -name "main.py" | head -n 1) && \cp "$LAUNCHER_PATH" /app/launcher.py# ============================================================# BRAIN PLACEMENT# ============================================================# Map your custom brain (output.nnue) correctly for the serverRUN find /app -maxdepth 2 -name "*.nnue" -exec cp {} /app/engine_bin/output.nnue \; || echo "No custom NNUE found."# Force permissions for the binary and brainRUN chmod -R 777 /app/engine_bin# ============================================================# BACKEND SETUP# ============================================================RUN pip install --no-cache-dir fastapi uvicorn chess==1.11.2 pydantic# Explicit Paths for DeepCastleENV ENGINE_PATH=/app/engine_bin/deepcastleENV NNUE_PATH=/app/engine_bin/output.nnueENV PYTHONPATH="/app:/app/server"EXPOSE 7860# STARTCMD ["python3", "/app/launcher.py"]
Dockerfile+17-38