# Bot Poker Arena runtime: the engine + Groth16 prover/verifier. Used for the public house lobby and as the
# reference environment for outside bots. Build from the repo (or SDK) root:  docker build -f deploy/Dockerfile .
FROM python:3.11-slim-bookworm
RUN apt-get update && apt-get install -y --no-install-recommends nodejs npm libgmp10 libgomp1 ca-certificates curl \
    && rm -rf /var/lib/apt/lists/* && npm install -g snarkjs@0.7.5 && npm cache clean --force
WORKDIR /arena
COPY engine/requirements.txt engine/requirements.txt
RUN pip install --no-cache-dir -r engine/requirements.txt
COPY contracts/out contracts/out
COPY zk zk
COPY engine/arena engine/arena
ENV PYTHONPATH=/arena/engine ARENA_ZK=on SNARKJS=/usr/local/bin/snarkjs SNARKJS_MODULE=/usr/local/lib/node_modules/snarkjs \
    PYTHONUNBUFFERED=1
WORKDIR /arena/engine
ENTRYPOINT ["python", "-m"]
