Skip to content

Commit 4e02517

Browse files
committed
Rename /testbed => /workspace
1 parent 3ccd828 commit 4e02517

10 files changed

Lines changed: 31 additions & 30 deletions

File tree

codeclash/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
DIR_LOGS = Path("/logs") # this is used also for parts of the paths in the environment
66
LOCAL_LOG_DIR = REPO_DIR / "logs" # this one is always relative to the location of this code
7-
DIR_WORK = Path("/testbed")
7+
DIR_WORK = Path("/workspace")
88
FILE_RESULTS = "results.json"
99
GH_ORG = "emagedoc"
1010
RESULT_TIE = "Tie"

codeclash/games/huskybench/huskybench.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import re
22

33
from codeclash.agents.player import Player
4+
from codeclash.constants import DIR_WORK
45
from codeclash.games.game import CodeGame, RoundStats
56
from codeclash.utils.environment import create_file_in_container
67

@@ -56,7 +57,7 @@ def _construct_game_script(self, agents: list[Player], run_cmd_round: str, verbo
5657
def execute_round(self, agents: list[Player]):
5758
cmd = f"{self.run_cmd_round} > {self.log_env / HB_LOG_ENGINE} 2>&1 &"
5859
script = self._construct_game_script(agents, cmd, verbose=True)
59-
create_file_in_container(container=self.environment, content=script, dest_path=f"/testbed/{HB_SCRIPT}")
60+
create_file_in_container(container=self.environment, content=script, dest_path=DIR_WORK / HB_SCRIPT)
6061
self.environment.execute(f"chmod +x {HB_SCRIPT}; ./{HB_SCRIPT}")
6162

6263
def get_results(self, agents: list[Player], round_num: int, stats: RoundStats):

codeclash/games/robotrumble/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ RUN mkdir -p /root/.cargo \
2525
# Clone the repo... (OMITTED)
2626

2727
# Pull public S3 assets
28-
RUN cd /testbed/cli && aws --no-sign-request s3 sync s3://rr-public-assets/lang-runners ../logic/wasm-dist/lang-runners
29-
RUN cd /testbed/cli && aws --no-sign-request s3 sync s3://rr-public-assets/cli-assets dist/
28+
RUN cd /workspace/cli && aws --no-sign-request s3 sync s3://rr-public-assets/lang-runners ../logic/wasm-dist/lang-runners
29+
RUN cd /workspace/cli && aws --no-sign-request s3 sync s3://rr-public-assets/cli-assets dist/
3030

3131
# Build without updating deps; use Cargo.lock as-is
32-
RUN cd /testbed/cli && cargo build --locked --release
32+
RUN cd /workspace/cli && cargo build --locked --release
3333

34-
# Place the built binary at /testbed/rumblebot
35-
RUN install -Dm755 /testbed/cli/target/release/rumblebot /testbed/rumblebot
34+
# Place the built binary at /workspace/rumblebot
35+
RUN install -Dm755 /workspace/cli/target/release/rumblebot /workspace/rumblebot
3636

3737
# Remove some unnecessary bloat
38-
RUN rm -rf /testbed/cli/target
38+
RUN rm -rf /workspace/cli/target
3939

4040
# Remove rust toolchains & caches
4141
RUN rm -rf /root/.cargo /root/.rustup /root/.cache \

docker/BattleCode.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
66
rm -rf /var/lib/apt/lists/*
77

88
ARG GITHUB_TOKEN
9-
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/BattleCode.git /testbed \
10-
&& cd /testbed \
9+
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/BattleCode.git /workspace \
10+
&& cd /workspace \
1111
&& git remote set-url origin https://github.com/emagedoc/BattleCode.git \
1212
&& unset GITHUB_TOKEN
13-
WORKDIR /testbed
13+
WORKDIR /workspace
1414

1515
RUN python run.py update

docker/BattleSnake.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ RUN ARCH=$(dpkg --print-architecture) && \
2020

2121
# Inject GitHub token for private repo access
2222
ARG GITHUB_TOKEN
23-
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/BattleSnake.git /testbed \
24-
&& cd /testbed \
23+
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/BattleSnake.git /workspace \
24+
&& cd /workspace \
2525
&& git remote set-url origin https://github.com/emagedoc/BattleSnake.git \
2626
&& unset GITHUB_TOKEN
2727

28-
WORKDIR /testbed
28+
WORKDIR /workspace
2929

3030
RUN cd game && go build -o battlesnake ./cli/battlesnake/main.go
3131
RUN pip install -r requirements.txt

docker/CoreWar.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ RUN apt-get update \
66
&& rm -rf /var/lib/apt/lists/*
77

88
ARG GITHUB_TOKEN
9-
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/CoreWar.git /testbed \
10-
&& cd /testbed \
9+
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/CoreWar.git /workspace \
10+
&& cd /workspace \
1111
&& git remote set-url origin https://github.com/emagedoc/CoreWar.git \
1212
&& unset GITHUB_TOKEN
1313

14-
WORKDIR /testbed
14+
WORKDIR /workspace
1515

1616
RUN cd src/ && make CFLAGS="-O -DEXT94 -DPERMUTATE -DRWLIMIT" LIB=""

docker/DummyGame.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ RUN apt-get update \
1313

1414
# Inject GitHub token for private repo access
1515
ARG GITHUB_TOKEN
16-
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/DummyGame.git /testbed \
17-
&& cd /testbed \
16+
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/DummyGame.git /workspace \
17+
&& cd /workspace \
1818
&& git remote set-url origin https://github.com/emagedoc/DummyGame.git \
1919
&& unset GITHUB_TOKEN
2020

21-
WORKDIR /testbed
21+
WORKDIR /workspace

docker/HuskyBench.Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ lsof \
1212
&& rm -rf /var/lib/apt/lists/*
1313

1414
ARG GITHUB_TOKEN
15-
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/HuskyBench.git /testbed \
16-
&& cd /testbed \
15+
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/HuskyBench.git /workspace \
16+
&& cd /workspace \
1717
&& git remote set-url origin https://github.com/emagedoc/HuskyBench.git \
1818
&& unset GITHUB_TOKEN
1919

20-
WORKDIR /testbed
20+
WORKDIR /workspace
2121

2222
RUN pip install -r engine/requirements.txt
23-
RUN mkdir -p /testbed/engine/output
23+
RUN mkdir -p /workspace/engine/output

docker/RoboCode.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ unzip \
1212
&& rm -rf /var/lib/apt/lists/*
1313

1414
ARG GITHUB_TOKEN
15-
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/RoboCode.git /testbed \
16-
&& cd /testbed \
15+
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/RoboCode.git /workspace \
16+
&& cd /workspace \
1717
&& git remote set-url origin https://github.com/emagedoc/RoboCode.git \
1818
&& unset GITHUB_TOKEN
1919

20-
WORKDIR /testbed
20+
WORKDIR /workspace

docker/RobotRumble.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ RUN apt-get update \
1010
&& rm -rf /var/lib/apt/lists/*
1111

1212
ARG GITHUB_TOKEN
13-
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/RobotRumble.git /testbed \
14-
&& cd /testbed \
13+
RUN git clone https://${GITHUB_TOKEN}@github.com/emagedoc/RobotRumble.git /workspace \
14+
&& cd /workspace \
1515
&& git remote set-url origin https://github.com/emagedoc/RobotRumble.git \
1616
&& unset GITHUB_TOKEN
1717

18-
WORKDIR /testbed
18+
WORKDIR /workspace

0 commit comments

Comments
 (0)