Hi team,
Thanks for what looks to be another awesome challenge this year!
I’m trying to run the engine and some bots using docker-compose as per the README in the ec-compose folder of the repo.
I think I’m nearly there, I’m just stuck on the 3rd and final step, “profit”
I’ve added some bot configs to the docker-compose.yml as follows:
version: "3.9"
services:
runner:
build: ../game-runner/
networks:
- network
environment:
BOT_COUNT: 2 # << changed this
ports:
- "5000:5000"
engine:
build: ../game-engine
networks:
- network
environment:
RunnerIp: runner
LOG_LEVEL: info
BOT_COUNT: 2
depends_on:
- "runner"
- "logger"
logger:
build: ../game-logger
networks:
- network
environment:
RUNNER_IPV4: runner
MATCH_STATUS_FILE: matchState.log
GAME_COMPLETE_FILE: gameComplete.log
depends_on:
- "runner"
bot1: # << added this
build:
context: ../../submission_repo
args:
DOCKER_BUILD: "true"
networks:
- network
environment:
RUNNER_IPV4: runner
depends_on:
- "runner"
- "engine"
- "logger"
bot2: # << added this
build: ../starter-bots/PythonBot
networks:
- network
environment:
RUNNER_IPV4: runner
depends_on:
- "runner"
- "engine"
- "logger"
The docker images seem to build fine for both the cpp and the python bot, but they have problems actually starting up.
Doing a docker-compose -p "ec" up --build
in the directory after making these changes results in:
...
bot1_1 | Error while sending data: connection was stopped before invocation result was received
...
bot2_1 | runner:5000/runnerhub
bot2_1 | Traceback (most recent call last):
bot2_1 | File "/app/StarterBot.py", line 89, in <module>
bot2_1 | run_bot()
bot2_1 | File "/app/StarterBot.py", line 63, in run_bot
bot2_1 | hub_connection.start()
bot2_1 | File "/usr/local/lib/python3.9/site-packages/signalrcore/hub/base_hub_connection.py", line 44, in start
bot2_1 | return self.transport.start()
bot2_1 | File "/usr/local/lib/python3.9/site-packages/signalrcore/transport/websockets/websocket_transport.py", line 62, in start
bot2_1 | self.negotiate()
bot2_1 | File "/usr/local/lib/python3.9/site-packages/signalrcore/transport/websockets/websocket_transport.py", line 93, in negotiate
bot2_1 | response = requests.post(
bot2_1 | File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 119, in post
bot2_1 | return request('post', url, data=data, json=json, **kwargs)
bot2_1 | File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
bot2_1 | return session.request(method=method, url=url, **kwargs)
bot2_1 | File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
bot2_1 | resp = self.send(prep, **send_kwargs)
bot2_1 | File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 649, in send
bot2_1 | adapter = self.get_adapter(url=request.url)
bot2_1 | File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 742, in get_adapter
bot2_1 | raise InvalidSchema("No connection adapters were found for {!r}".format(url))
bot2_1 | requests.exceptions.InvalidSchema: No connection adapters were found for 'runner:5000/runnerhub/negotiate'
...
engine_1 | [INFO] [RunLoop]: Waiting for all bots to connect
So I suspect I’m still missing something in the compose YAML?
Thanks in advance