Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow executing GPU bots #3

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and a proper GRPC API for the engine to communicate with the bots.
- [Map Generator](https://dovixman.github.io/lighthouses_map_generator/)
- [Go bot template](https://github.com/intelygenz/codeconz-lighthouses-go-bot)
- [Python random bot template](https://github.com/intelygenz/codeconz-lighthouses-py-bot)
- [Python Reinforcement Learning bot template](https://github.com/intelygenz/codeconz-lighthouses-py-rl-bot)

To start building a bot, you will need to take the following steps:

Expand Down
8 changes: 7 additions & 1 deletion start-game.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function add_game_server() {
hostname: ${GAME_CONTAINER_NAME}
restart: no
environment:
BOARD_PATH: "/maps/${THIS_MAP}"
BOARD_PATH: "./maps/${THIS_MAP}"
TURNS: "${THIS_GAME_TURNS}"
TURN_REQUEST_TIMEOUT: "${THIS_GAME_REQ_TIMEOUT}"
TIME_BETWEEN_ROUNDS: "${THIS_GAME_TIME_ROUNDS}"
Expand Down Expand Up @@ -252,11 +252,17 @@ function add_bot() {

${THIS_BOT_NAME}:
environment:
NVIDIA_VISIBLE_DEVICES: all
BOT_NAME: ${THIS_BOT_NAME}
image: ${THIS_IMAGE}
container_name: ${THIS_BOT_NAME}
hostname: ${THIS_BOT_NAME}
restart: no
deploy:
resources:
reservations:
devices:
- capabilities: ["gpu"]
ports:
- ${BOT_DEFAULT_PORT}
networks:
Expand Down