Amogh1221 commited on
Commit
31833ae
·
verified ·
1 Parent(s): 5946842

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -21
Dockerfile CHANGED
@@ -26,45 +26,31 @@ RUN echo "--- REPOSITORY CONTENT DEBUG ---" && \
26
 
27
  # BUILD YOUR CUSTOM ENGINE (The Source Fix)
28
  # ============================================================
29
- # Create a dummy net.sh to bypass the missing script error (we provide our own brain anyway)
30
  RUN mkdir -p /app/scripts && \
31
  echo '#!/bin/sh\nexit 0' > /app/scripts/net.sh && \
32
  chmod +x /app/scripts/net.sh
33
 
34
  WORKDIR /app/src
35
 
36
- # We build from YOUR 'src/' folder so it natively supports your output.nnue
 
 
 
 
37
  RUN make -j$(nproc) build ARCH=x86-64 && \
38
  mkdir -p /app/engine && \
39
  cp stockfish /app/engine/deepcastle && \
40
  chmod +x /app/engine/deepcastle
41
 
42
- # ============================================================
43
- # LAUNCHER PREPARATION (The Search & Destroy Fix)
44
- # ============================================================
45
- WORKDIR /app
46
- RUN echo "Searching for Launcher (main.py)..." && \
47
- LAUNCHER_PATH=$(find /app -name "main.py" | head -n 1) && \
48
- if [ -n "$LAUNCHER_PATH" ]; then \
49
- echo "Found launcher at: $LAUNCHER_PATH. Copying to root..."; \
50
- cp "$LAUNCHER_PATH" /app/launcher.py; \
51
- else \
52
- echo "CRITICAL ERROR: main.py not found in the repository!"; \
53
- exit 1; \
54
- fi
55
-
56
  # ============================================================
57
  # BRAIN PLACEMENT (The Neural Sync)
58
  # ============================================================
59
  WORKDIR /app/engine
60
 
61
- # Download your trained brain directly from HF Space to be 100% sure it exists
62
  RUN wget -q https://huggingface.co/spaces/Amogh1221/deepcastle-api/resolve/main/output.nnue -O /app/engine/output.nnue
63
 
64
- # Also download failsafe stockfish brains (backup)
65
- RUN wget -q https://tests.stockfishchess.org/api/nn/nn-9a0cc2a62c52.nnue && \
66
- wget -q https://tests.stockfishchess.org/api/nn/nn-47fc8b7fff06.nnue
67
-
68
  # ============================================================
69
  # BACKEND SETUP
70
  # ============================================================
 
26
 
27
  # BUILD YOUR CUSTOM ENGINE (The Source Fix)
28
  # ============================================================
29
+ # Create a dummy net.sh to bypass the missing script error
30
  RUN mkdir -p /app/scripts && \
31
  echo '#!/bin/sh\nexit 0' > /app/scripts/net.sh && \
32
  chmod +x /app/scripts/net.sh
33
 
34
  WORKDIR /app/src
35
 
36
+ # Download required brains into src/ so they can be embedded during build
37
+ RUN wget -q https://tests.stockfishchess.org/api/nn/nn-9a0cc2a62c52.nnue && \
38
+ wget -q https://tests.stockfishchess.org/api/nn/nn-47fc8b7fff06.nnue
39
+
40
+ # Build from YOUR 'src/' folder
41
  RUN make -j$(nproc) build ARCH=x86-64 && \
42
  mkdir -p /app/engine && \
43
  cp stockfish /app/engine/deepcastle && \
44
  chmod +x /app/engine/deepcastle
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  # ============================================================
47
  # BRAIN PLACEMENT (The Neural Sync)
48
  # ============================================================
49
  WORKDIR /app/engine
50
 
51
+ # Download your trained brain directly from HF Space
52
  RUN wget -q https://huggingface.co/spaces/Amogh1221/deepcastle-api/resolve/main/output.nnue -O /app/engine/output.nnue
53
 
 
 
 
 
54
  # ============================================================
55
  # BACKEND SETUP
56
  # ============================================================