Games-and-Simulations / sc-docker

Multi-platform Version of StarCraft: Brood War in a Docker Container, ready to use for bot play simulations.
MIT License
230 stars 41 forks source link

Java Heap out of memory #65

Closed Payne-X6 closed 6 years ago

Payne-X6 commented 6 years ago

I would like to add -Xmx parameter at start of my bot.

I would like to add Tensorflow into my bot, but when I do that, java runtime runs out of memory. This project is just for my purpose, probably not for SSCAIT league. Could you add this feature? I have not found any option for this.

Using other words I just need to run 'java --Xmx2048m -jar bot.jar' (for example) but using scbw.play script.

operating system

Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial

docker version

Client: Version: 18.03.1-ce API version: 1.37 Go version: go1.9.5 Git commit: 9ee9f40 Built: Thu Apr 26 07:17:20 2018 OS/Arch: linux/amd64 Experimental: false Orchestrator: swarm

Server: Engine: Version: 18.03.1-ce API version: 1.37 (minimum version 1.12) Go version: go1.9.5 Git commit: 9ee9f40 Built: Thu Apr 26 07:15:30 2018 OS/Arch: linux/amd64 Experimental: false

scbw version

0.2a20
kant2002 commented 6 years ago

@Payne-X6 Currently this is not possible. But you could do this manually by

  1. checking out source code
  2. and change line https://github.com/Games-and-Simulations/sc-docker/blob/43a8f0568e83262c1c1e4d864c4a37286fb54523/docker/scripts/play_common.sh#L116 where you pass parameters.
  3. Then you could build custom images from docker folder.
  4. Download JRE and place it in the root of docker folder as specified in the docker/README.md file
  5. You need to run build_images.sh or build_images.ps1 dependent on where you do build
  6. Then you need to rebuild local image by running scbw.play --install