Amogh1221 commited on
Commit
0972f7d
·
1 Parent(s): 99be621

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -1,3 +1,4 @@
 
1
  FROM python:3.12-slim
2
 
3
  # Install system dependencies
@@ -28,7 +29,7 @@ RUN if [ -d /app/engine/src ]; then BUILD_DIR=/app/engine/src; \
28
  elif [ -d /app/src ]; then BUILD_DIR=/app/src; \
29
  else echo "Engine source dir not found"; exit 1; fi && \
30
  cd "$BUILD_DIR" && \
31
- make -j$(nproc) ARCH=x86-64-modern && \
32
  mkdir -p /app/engine_bin && \
33
  cp stockfish /app/engine_bin/deepcastle && \
34
  chmod +x /app/engine_bin/deepcastle
@@ -53,7 +54,11 @@ RUN chmod -R 777 /app/engine_bin
53
  # ============================================================
54
  # BACKEND SETUP
55
  # ============================================================
56
- RUN pip install --no-cache-dir fastapi uvicorn chess==1.11.2 pydantic
 
 
 
 
57
 
58
  # Explicit Paths
59
  ENV ENGINE_PATH=/app/engine_bin/deepcastle
 
1
+ # Use Python 3.12 slim
2
  FROM python:3.12-slim
3
 
4
  # Install system dependencies
 
29
  elif [ -d /app/src ]; then BUILD_DIR=/app/src; \
30
  else echo "Engine source dir not found"; exit 1; fi && \
31
  cd "$BUILD_DIR" && \
32
+ make -j$(nproc) build ARCH=x86-64-sse41-popcnt && \
33
  mkdir -p /app/engine_bin && \
34
  cp stockfish /app/engine_bin/deepcastle && \
35
  chmod +x /app/engine_bin/deepcastle
 
54
  # ============================================================
55
  # BACKEND SETUP
56
  # ============================================================
57
+ RUN if [ -f /app/server/requirements.txt ]; then \
58
+ pip install --no-cache-dir -r /app/server/requirements.txt; \
59
+ else \
60
+ pip install --no-cache-dir fastapi "uvicorn[standard]" websockets python-chess pydantic; \
61
+ fi
62
 
63
  # Explicit Paths
64
  ENV ENGINE_PATH=/app/engine_bin/deepcastle