11# =============================================================================
22# THUAI9 Client Image — runs player AI (Python or C++)
3+ # Adapted from THUAI8 pattern
34#
45# Build:
5- # docker build -f dependency/Dockerfile/Dockerfile_run_client \
6+ # docker build --build-arg BASE_IMAGE=eesast/thuai9_base:base \
7+ # -f dependency/Dockerfile/Dockerfile_run_client \
68# -t eesast/thuai9_client:latest .
79#
8- # Run (Python ):
10+ # Run (competition — code files in /usr/local/code/ named by player label ):
911# docker run --rm \
10- # -e TEAM_ID=1 -e SERVER_IP=host.docker.internal \
11- # -e PLAYER_LANG=python \
12- # eesast/thuai9_client:latest
13- #
14- # Run (C++ — mount compiled binary):
15- # docker run --rm \
16- # -e TEAM_ID=1 -e SERVER_IP=host.docker.internal \
17- # -e PLAYER_LANG=cpp \
18- # -v "$(pwd)/output/capi:/usr/local/PlayerCode/CAPI/cpp/build/capi" \
12+ # -v /path/to/team/code:/usr/local/code \
13+ # -v /path/to/output:/usr/local/output \
14+ # -e TERMINAL=CLIENT -e TEAM_LABEL=TeamA -e TEAM_SEQ_ID=0 \
15+ # -e CONNECT_IP=172.17.0.1 -e GAME_TIME=600 \
1916# eesast/thuai9_client:latest
2017# =============================================================================
2118ARG BASE_IMAGE=eesast/thuai9_base:base
2219FROM ${BASE_IMAGE}
2320LABEL maintainer="eesast"
2421LABEL description="THUAI9 player client runner"
2522
23+ WORKDIR /usr/local
24+
25+ RUN mkdir -p /usr/local/code /usr/local/output
26+
2627# Copy player code
2728COPY ./CAPI/python ./PlayerCode/CAPI/python
2829COPY ./dependency/proto ./PlayerCode/dependency/proto
@@ -45,6 +46,5 @@ WORKDIR /usr/local
4546COPY ./dependency/shell/run.sh .
4647
4748ENV TERMINAL=CLIENT
48- ENV PLAYER_LANG=python
4949
5050ENTRYPOINT ["bash", "./run.sh"]
0 commit comments